Skip to content

Add final beta5 updates #5

Add final beta5 updates

Add final beta5 updates #5

Workflow file for this run

name: perform-release
on:
push:
tags:
- 'v*'
permissions:
contents: read
# Check that pushed tag points to latest master commit, then build release and create GitHub release alongside.
jobs:
check-tag-latest:
name: Compare tag with master
runs-on: ubuntu-latest
outputs:
tag_hash: ${{ github.sha }}
master_hash: ${{ steps.master-commit-hash.outputs.master_hash }}
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
ref: master
sparse-checkout: .
- name: Get latest master commit hash
id: master-commit-hash
run: |
hash=$(git log -n1 --format=format:"%H")
echo "master_hash=$hash" >> "$GITHUB_OUTPUT"
zip-artifacts:
name: Zip and Push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Zip both artifacts
run: |
rm -rf ss2_scp_deutsch*.zip
zip -r ss2_scp_deutsch-${GITHUB_REF#refs/*/}.zip . -x ".git*" "source/*"
zip -r ss2_scp_deutsch_text-${GITHUB_REF#refs/*/}.zip . -i "*.fon" "*.str" "*.md" "Anwendung-ReadMe.txt" -x ".git*" "source/*"
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: SCP_RELEASE
path: "./*.zip"
if-no-files-found: error
gh-release:
needs: [check-tag-latest, zip-artifacts]
name: Create GitHub release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v3
with:
name: SCP_RELEASE
- name: Set tag name to env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Push GitHub release
uses: ncipollo/release-action@v1
with:
artifacts: "*.zip"
generateReleaseNotes: true
replacesArtifacts: false
skipIfReleaseExists: true
tag: ${{ env.RELEASE_VERSION }}