-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
115 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# set input or default | ||
|
||
DEFAULTPACKAGEVERSION="1.0.0-Test-DATE-TIME" | ||
PACKAGEVERSION=${1:-$DEFAULTPACKAGEVERSION} | ||
|
||
# replace date | ||
DATE_SHORT=$(date +'%Y%m%d') | ||
PACKAGEVERSION="${PACKAGEVERSION/DATE/$DATE_SHORT}" | ||
|
||
# replace time | ||
TIME_SHORT=$(date +'%H%M%S') | ||
PACKAGEVERSION="${PACKAGEVERSION/TIME/$TIME_SHORT}" | ||
|
||
# report semver | ||
echo "GHENV_PACKAGEVERSION=$PACKAGEVERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: 'Build packages and store artifacts' | ||
description: 'Build packages and store artifacts' | ||
|
||
inputs: | ||
nuget-semver: | ||
description: 'package version' | ||
required: false | ||
default: '1.0.0-Test-DATE-TIME' | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
|
||
- name: Setup .NET SDK | ||
uses: actions/setup-dotnet@v4 | ||
|
||
- name: Build | ||
run: | | ||
chmod +x ./SharpGLTF.Build.sh | ||
./SharpGLTF.Build.sh ${{inputs.nuget-semver}} | ||
shell: bash | ||
|
||
- name: Archive | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nuget-packages | ||
retention-days: 1 | ||
path: | | ||
*.nupkg | ||
*.snupkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: 'Push Github Tag' | ||
description: 'Pushes a new github tag from Master' | ||
|
||
inputs: | ||
tag-name: | ||
description: 'name of the tag' | ||
required: true | ||
default: 'tag' | ||
message: | ||
description: 'message' | ||
required: false | ||
default: 'message' | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
|
||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
|
||
# https://github.com/orgs/community/discussions/40405 | ||
- run: | | ||
git config --global user.name "${{ github.actor }}" | ||
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" | ||
git tag -a "${{inputs.tag-name}}" -m "${{inputs.message}}" | ||
git push origin "${{inputs.tag-name}}" | ||
shell: bash | ||
# # alternative solution: | ||
# # https://github.com/rickstaa/action-create-tag | ||
# - name: create tag | ||
# uses: rickstaa/action-create-tag@v1 | ||
# id: "tag_create" | ||
# with: | ||
# tag: "${{inputs.tag-name}}" | ||
# tag_exists_error: true | ||
# message: "${{inputs.message}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters