Skip to content

Commit

Permalink
Update GitHub Actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Aug 18, 2023
1 parent 1d5a255 commit 11fbe75
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/CI_macOS.yml
Expand Up @@ -12,6 +12,8 @@ on:

jobs:
macos-build:
permissions:
contents: write # Needed to upload to releases
env:
MACOSX_DEPLOYMENT_TARGET: 10.12
VSCMD_SKIP_SENDTELEMETRY: 1
Expand Down Expand Up @@ -120,12 +122,11 @@ jobs:
# Upload Release assets (if a release tag)
#####################################################
- name: Upload Release Assets
if: startsWith(github.ref, 'refs/tags/') && (github.repository == 'Warzone2100/WMIT')
uses: past-due/action-gh-release@v1
with:
# Do not explicitly specify a tag_name, so this action takes the github.ref and parses it for just the tag
files: |
${{ env.WMIT_OUTPUT_ZIP }}
# draft: true
if: success() && (startsWith(github.ref, 'refs/tags/') && (github.repository == 'Warzone2100/WMIT'))
run: |
$SOURCE_TAG = "$($env:WZ_GITHUB_REF -replace "refs/tags/")"
gh release upload "${SOURCE_TAG}" "${WMIT_OUTPUT_ZIP}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
WZ_GITHUB_REF: ${{ github.ref }}
2 changes: 2 additions & 0 deletions .github/workflows/CI_ubuntu.yml
Expand Up @@ -8,6 +8,8 @@ jobs:
build-ubuntu:
name: Ubuntu
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v3
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/CI_windows.yml
Expand Up @@ -23,6 +23,8 @@ jobs:
VSCMD_SKIP_SENDTELEMETRY: 1
name: '${{ matrix.architecture }} [${{ matrix.compiler }}]'
runs-on: windows-latest
permissions:
contents: write # Needed to upload to releases
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -106,7 +108,7 @@ jobs:
# Determine which matrix combinations to deploy
$WZ_DEPLOY_RELEASE = 'false'
if ($env:WZ_MSVC_VER -eq "MSVC_2019") {
if ($env:WZ_MSVC_VER -eq "MSVC_2022") {
$WZ_DEPLOY_RELEASE = 'true'
}
Expand Down Expand Up @@ -174,12 +176,11 @@ jobs:
# Upload Release assets (if a release tag)
#####################################################
- name: Upload Release Assets
if: startsWith(github.ref, 'refs/tags/') && (steps.settings.outputs.WZ_DEPLOY_RELEASE == 'true') && (github.repository == 'Warzone2100/WMIT')
uses: past-due/action-gh-release@v1
with:
# Do not explicitly specify a tag_name, so this action takes the github.ref and parses it for just the tag
files: |
${{ github.workspace }}\output\installer\*.exe
# draft: true
if: success() && (startsWith(github.ref, 'refs/tags/') && (steps.settings.outputs.WZ_DEPLOY_RELEASE == 'true') && (github.repository == 'Warzone2100/WMIT'))
run: |
$SOURCE_TAG = "$($env:WZ_GITHUB_REF -replace "refs/tags/")"
gh release upload "${SOURCE_TAG}" "${{ github.workspace }}\output\installer\*.exe"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
WZ_GITHUB_REF: ${{ github.ref }}

0 comments on commit 11fbe75

Please sign in to comment.