Release v0.2.0 #2
Workflow file for this run
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
name: Publish Release | |
on: | |
workflow_dispatch: | |
push: | |
tags: [ '*' ] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: Build and Publish Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Fetch all tags | |
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Get current tag | |
run: echo "CURRENT_TAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV | |
- name: Setup .NET 8 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.x' | |
- name: Build Windows x86_64 | |
run: dotnet publish -c Release -r win-x64 | |
- name: Build Linux x86_64 | |
run: dotnet publish -c Release -r linux-x64 | |
- name: Build MacOS x86_64 | |
run: dotnet publish -c Release -r osx-x64 | |
- name: Build MacOS ARM64 | |
run: dotnet publish -c Release -r osx-arm64 | |
- name: Copy Content | |
run: | | |
cp -r Content bin/Release/net8.0/win-x64/publish | |
cp -r Content bin/Release/net8.0/linux-x64/publish | |
cp -r Content bin/Release/net8.0/osx-x64/publish | |
cp -r Content bin/Release/net8.0/osx-arm64/publish | |
- name: Create ZIP archives | |
run: | | |
pushd bin/Release/net8.0/win-x64/publish | |
zip -r ../../../../../Celeste64-TAS-${{env.CURRENT_TAG}}-win-x64.zip ./* | |
popd | |
pushd bin/Release/net8.0/linux-x64/publish | |
zip -r ../../../../../Celeste64-TAS-${{env.CURRENT_TAG}}-linux-x64.zip ./* | |
popd | |
pushd bin/Release/net8.0/osx-x64/publish | |
zip -r ../../../../../Celeste64-TAS-${{env.CURRENT_TAG}}-osx-x64.zip ./* | |
popd | |
pushd bin/Release/net8.0/osx-arm64/publish | |
zip -r ../../../../../Celeste64-TAS-${{env.CURRENT_TAG}}-osx-arm64.zip ./* | |
popd | |
- name: Publish Github Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifactErrorsFailBuild: true | |
tag: ${{env.CURRENT_TAG}} | |
name: Celeste64 TAS v${{env.CURRENT_TAG}} | |
makeLatest: true | |
generateReleaseNotes: true | |
artifacts: "Celeste64-TAS-*.zip" |