Skip to content

Commit

Permalink
release workflow kinda jank imo
Browse files Browse the repository at this point in the history
  • Loading branch information
KTrain5169 committed Sep 8, 2024
1 parent 4ab49cd commit 5433d22
Showing 1 changed file with 38 additions and 21 deletions.
59 changes: 38 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,37 +49,54 @@ jobs:
name: ${{ matrix.os }}_dist
path: dist/

download:
name: Download distributable build
release:
name: Draft a release
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
os: ["windows-latest", "macos-latest", "ubuntu-latest"]
steps:
- name: Create release-artifacts directory
run: mkdir -p release-artifacts
- name: Install zipping utility
run: sudo apt install zip

- name: Download distributable build
- name: Download Windows artifact
uses: actions/download-artifact@v4
with:
name: ${{ matrix.os }}_dist
name: windows-latest_dist
path: release-artifacts

- name: Rename directories to avoid duplicate file names
- name: Rename Windows artifacts
run: |
cd release-artifacts
mv main/ ${{ matrix.os }}_dist/
mv main/ windows-latest_dist/
zip -r ${{ github.ref }}-windows-release.zip windows-latest_dist
cd translator
- name: List downloaded files
run: ls -R release-artifacts
- name: Download MacOS artifact
uses: actions/download-artifact@v4
with:
name: macos-latest_dist
path: release-artifacts

- name: Rename Windows artifacts
run: |
cd release-artifacts
mv main/ macos-latest_dist/
zip -r ${{ github.ref }}-mac-release.zip macos-latest_dist
cd translator
- name: Download Linux artifact
uses: actions/download-artifact@v4
with:
name: ubuntu-latest_dist
path: release-artifacts

- name: Rename Windows artifacts
run: |
cd release-artifacts
mv main/ linux-latest_dist/
zip -r ${{ github.ref }}-linux-release.zip linux-latest_dist
cd translator
release:
name: Draft a release
runs-on: ubuntu-latest
needs: download
steps:
- name: List release-artifacts directory
- name: List release-artifacts directory # debug
run: ls -R release-artifacts

- name: Draft release
Expand All @@ -88,5 +105,5 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
tag: ${{ github.ref_name }}
artifacts: release-artifacts/*_dist
artifacts: release-artifacts/*-release.zip
draft: true

0 comments on commit 5433d22

Please sign in to comment.