From e4436407ba9c2e1d7f578d422336d6e86b2c6ab5 Mon Sep 17 00:00:00 2001 From: Aaron T Date: Mon, 23 Oct 2023 16:52:12 +0100 Subject: [PATCH] rename releases before uploading (#31) --- .github/workflows/release-artifacts.yml | 34 ------------------------- .github/workflows/release-creation.yml | 19 +++++++++----- 2 files changed, 12 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/release-artifacts.yml diff --git a/.github/workflows/release-artifacts.yml b/.github/workflows/release-artifacts.yml deleted file mode 100644 index 5aa465c..0000000 --- a/.github/workflows/release-artifacts.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Upload Release Artifacts - -on: - release: - types: - - published - -jobs: - upload-release-artifacts: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Get Release Tag - id: get-release-tag - run: | - release_tag="${{ github.event.release.tag_name }}" - echo "Uploading artifacts to release with tag: $release_tag" - shell: bash - - - name: Upload Release Artifacts - if: ${{ steps.get-release-tag.outputs.release_tag != '' }} - run: | - release_tag="${{ steps.get-release-tag.outputs.release_tag }}" - # Use the release tag to determine which release to upload to - - # Assuming $release_tag contains the tag name of the release - # Replace 'your-artifact-directory' with the path to your artifact directory - gh release upload "$release_tag" ./artifact/RTWRand-macos.zip --clobber - gh release upload "$release_tag" ./artifact/RTWRand-windows.zip --clobber - gh release upload "$release_tag" ./artifact/RTWRand-linux.zip --clobber - shell: bash \ No newline at end of file diff --git a/.github/workflows/release-creation.yml b/.github/workflows/release-creation.yml index 3bf0fea..23770bd 100644 --- a/.github/workflows/release-creation.yml +++ b/.github/workflows/release-creation.yml @@ -12,7 +12,6 @@ on: name: combined-release-workflow env: - GH_TOKEN: ${{ github.token }} Repo: "sargeantPig/RTWLibTools" jobs: @@ -30,13 +29,15 @@ jobs: - name: Wait for 2 minutes run: | - sleep 120 # Sleep for 2 minutes (2 minutes * 60 seconds/minute) + 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 - + 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: @@ -45,7 +46,9 @@ jobs: - 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 + 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 @@ -55,8 +58,10 @@ jobs: - 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 - + 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: