Feat: rename artifacts (#32) #18
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
on: | |
workflow_run: | |
workflows: | |
- "macos-build-test.yml" | |
- "windows-build-test.yml" | |
- "linux-build-test.yml" | |
types: | |
- completed | |
push: | |
branches: | |
- main | |
name: combined-release-workflow | |
env: | |
Repo: "sargeantPig/RTWLibTools" | |
jobs: | |
combined-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Release Please | |
id: release | |
uses: google-github-actions/release-please-action@v3 | |
with: | |
release-type: simple | |
- name: Wait for 2 minutes | |
run: | | |
sleep 80 # Sleep for 80 seconds | |
shell: bash | |
- name: Publish Windows Build | |
if: ${{ steps.release.outputs.release_created }} | |
run: | | |
dotnet publish ${{github.workspace}}/RTWLib_CLI/RTWLib_CLI.csproj -c Release -r win-x64 --self-contained true -o ./publish/win-x64 | |
mv ./publish/win-x64/RTW-CLI-Randomiser.exe ./publish/win-x64/RTW-CLI-Randomiser-windows.exe | |
- name: Publish Windows Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: RTWRand-windows | |
path: ${{github.workspace}}/publish/win-x64 | |
- name: Publish macOS Build | |
if: ${{ steps.release.outputs.release_created }} | |
run: | | |
dotnet publish ${{github.workspace}}/RTWLib_CLI/RTWLib_CLI.csproj -c Release -r osx-x64 --self-contained true -o ./publish/osx-x64 | |
mv ./publish/osx-x64/RTW-CLI-Randomiser ./publish/osx-x64/RTW-CLI-Randomiser-macOS | |
- name: Publish macOS Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: RTWRand-macos | |
path: ${{github.workspace}}/publish/osx-64 | |
- name: Publish Linux Build | |
if: ${{ steps.release.outputs.release_created }} | |
run: | | |
dotnet publish ${{github.workspace}}/RTWLib_CLI/RTWLib_CLI.csproj -c Release -r linux-x64 --self-contained true -o ./publish/linux-x64 | |
mv ./publish/linux-x64/RTW-CLI-Randomiser ./publish/linux-x64/RTW-CLI-Randomiser-linux | |
- name: Publish linux Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: RTWRand-linux | |
path: ${{github.workspace}}/publish/linux-x64 | |
- name: Upload Release Artifact | |
if: ${{ steps.release.outputs.release_created }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload ${{ steps.release.outputs.tag_name }} ${{github.workspace}}/publish/win-x64/* --clobber | |
gh release upload ${{ steps.release.outputs.tag_name }} ${{github.workspace}}/publish/osx-x64/* --clobber | |
gh release upload ${{ steps.release.outputs.tag_name }} ${{github.workspace}}/publish/linux-x64/* --clobber | |