-
Notifications
You must be signed in to change notification settings - Fork 21
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
65 changed files
with
273 additions
and
3,566 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,33 @@ | ||
name: Create Tag | ||
|
||
on: | ||
workflow_dispatch: # Allows manual triggering | ||
|
||
jobs: | ||
create-tag: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all tags and branches | ||
|
||
- name: Create Tag | ||
id: create_tag | ||
run: echo "TAG_NAME=$(pwsh ./scripts/Create-Tag.ps1)" >> $GITHUB_OUTPUT | ||
|
||
- name: Push Tag | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git push origin ${{ steps.create_tag.outputs.TAG_NAME }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Trigger Build and Release Workflow | ||
uses: peter-evans/repository-dispatch@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
event-type: new-tag-created | ||
client-payload: '{"tag": "${{ steps.create_tag.outputs.tag_name }}"}' |
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,71 @@ | ||
name: Build and Release | ||
|
||
on: | ||
repository_dispatch: | ||
types: [new-tag-created] | ||
|
||
env: | ||
PROJECT_NAME: lol2gltf | ||
DOTNET_VERSION: "8.0.x" | ||
|
||
jobs: | ||
build-and-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
|
||
- name: Cache NuGet packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.nuget/packages | ||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-nuget- | ||
- name: Restore dependencies | ||
working-directory: src | ||
run: | | ||
dotnet restore | ||
- name: Build | ||
working-directory: src | ||
run: | | ||
dotnet build -c Release -f net8.0 --no-restore | ||
- name: Publish | ||
working-directory: src | ||
run: | | ||
dotnet publish -c Release -f net8.0 -r win-x64 --self-contained true --no-restore | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.PROJECT_NAME }}-${{ github.event.client_payload.tag }}.exe | ||
path: ./src/bin/x64/Release/net8.0/win-x64/publish/${{ env.PROJECT_NAME }}.exe | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.event.client_payload.tag }} | ||
release_name: Release ${{ github.event.client_payload.tag }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./src/bin/x64/Release/net8.0/win-x64/publish/${{ env.PROJECT_NAME }}.exe | ||
asset_name: ${{ env.PROJECT_NAME }}-${{ github.event.client_payload.tag }}.exe | ||
asset_content_type: application/octet-stream |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.