Skip to content

Commit

Permalink
New Release automation (#83)
Browse files Browse the repository at this point in the history
* change to use our own release action

* Change release to seperate job, run on tag creation

* fix all_builds.yml

* Update all_builds.yml

* CI: Use forked action-gh-release instead
  • Loading branch information
nikitalita authored Oct 17, 2022
1 parent 3d8ea2e commit c811920
Showing 1 changed file with 33 additions and 16 deletions.
49 changes: 33 additions & 16 deletions .github/workflows/all_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ on:
- "!.github/**"
- ".github/actions/**"
- ".github/workflows/all_builds.yml"
release:
types: ["created"]

# Global Settings
# SCONS_CACHE for windows must be set in the build environment
Expand Down Expand Up @@ -201,19 +199,38 @@ jobs:
path: ${{github.workspace}}/modules/gdsdecomp/standalone/.export/*
retention-days: 90

- name: Zip Release
continue-on-error: true
shell: pwsh
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: "ubuntu-20.04"
permissions:
contents: write
needs: build
steps:
- name: Download Linux artifact
uses: actions/download-artifact@v3
with:
name: GDRE_tools-standalone-linux
path: artifacts/linux
- name: Download MacOS artifact
uses: actions/download-artifact@v3
with:
name: GDRE_tools-standalone-macos
path: artifacts/macos
- name: Download Windows artifact
uses: actions/download-artifact@v3
with:
name: GDRE_tools-standalone-windows
path: artifacts/windows
- name: Zip artifacts
run: |
cd ${{github.workspace}}/modules/gdsdecomp/standalone/.export
7z a "GDRE_tools-${{ github.event.release.tag_name }}-${{ matrix.platform }}.zip" *
if: github.event_name == 'release'

- name: Upload to Release
uses: svenstaro/upload-release-action@v2
ls -la artifacts/*
zip -r9 "artifacts/GDRE_tools-${{ github.ref_name }}-windows.zip" artifacts/windows/*
mv "artifacts/macos/gdre_tools.universal.zip" "artifacts/GDRE_tools-${{ github.ref_name }}-macos.zip"
zip -r9 "artifacts/GDRE_tools-${{ github.ref_name }}-linux.zip" artifacts/linux/*
- name: Release
uses: nikitalita/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{github.workspace}}/modules/gdsdecomp/standalone/.export/GDRE_tools-${{ github.event.release.tag_name }}-${{ matrix.platform }}.zip
tag: ${{ github.ref }}
overwrite: true
if: github.event_name == 'release'
files: |
artifacts/GDRE_tools-${{ github.ref_name }}-windows.zip
artifacts/GDRE_tools-${{ github.ref_name }}-macos.zip
artifacts/GDRE_tools-${{ github.ref_name }}-linux.zip

0 comments on commit c811920

Please sign in to comment.