Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
loathingKernel committed Nov 14, 2024
1 parent 66a1088 commit d619c71
Show file tree
Hide file tree
Showing 6 changed files with 171 additions and 26 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build-umu-debian-12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [published]

jobs:
build:
Expand Down Expand Up @@ -41,7 +39,13 @@ jobs:
run: mkdir -p results && cp -rvf ../*.deb results/

- name: Upload artifact
uses: actions/upload-artifact@v4.0.0
uses: actions/upload-artifact@v4
with:
name: Debian-12
path: results/
name: python3-umu-launcher_${{ github.ref_name }}-1_amd64_debian12.deb
path: results/python3-umu-launcher_${{ github.ref_name }}-1_amd64.deb

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: umu-launcher_${{ github.ref_name }}-1_amd64_debian12.deb
path: results/umu-launcher_${{ github.ref_name }}-1_all.deb
8 changes: 3 additions & 5 deletions .github/workflows/build-umu-fedora-40.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: UMU RPM Build - Fedora/Nobara
name: UMU RPM Build - Fedora/Nobara 40

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [published]

jobs:
build:
Expand Down Expand Up @@ -36,7 +34,7 @@ jobs:
rpmbuild -ba packaging/rpm/umu-launcher.spec
- name: Fedora-40
uses: actions/upload-artifact@v4.0.0
uses: actions/upload-artifact@v4
with:
name: umu-launcher-rpm-40
name: umu-launcher-${{ github.ref_name }}.fc40.noarch.rpm
path: ~/rpmbuild/RPMS/noarch/*.rpm
8 changes: 3 additions & 5 deletions .github/workflows/build-umu-fedora-41.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: UMU RPM Build - Fedora/Nobara
name: UMU RPM Build - Fedora/Nobara 41

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [published]

jobs:
build:
Expand Down Expand Up @@ -36,7 +34,7 @@ jobs:
rpmbuild -ba packaging/rpm/umu-launcher.spec
- name: Fedora-41
uses: actions/upload-artifact@v4.0.0
uses: actions/upload-artifact@v4
with:
name: umu-launcher-rpm-41
name: umu-launcher-${{ github.ref_name }}.fc41.noarch.rpm
path: ~/rpmbuild/RPMS/noarch/*.rpm
14 changes: 9 additions & 5 deletions .github/workflows/build-umu-ubuntu-noble.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [published]

jobs:
build:
Expand Down Expand Up @@ -41,7 +39,13 @@ jobs:
run: mkdir -p results && cp -rvf ../*.deb results/

- name: Upload artifact
uses: actions/upload-artifact@v4.0.0
uses: actions/upload-artifact@v4
with:
name: Ubuntu-24
path: results/
name: python3-umu-launcher_${{ github.ref_name }}-1_amd64_ubuntu-noble.deb
path: results/python3-umu-launcher_${{ github.ref_name }}-1_amd64.deb

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: umu-launcher_${{ github.ref_name }}-1_amd64_ubuntu-noble.deb
path: results/umu-launcher_${{ github.ref_name }}-1_all.deb
10 changes: 4 additions & 6 deletions .github/workflows/build-umu-zipapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [published]

jobs:
build:
Expand Down Expand Up @@ -37,10 +35,10 @@ jobs:
- name: Create symlink for launchers
# To preserve file mode bits and link file, use a tar archive.
# See https://github.com/actions/upload-artifact?tab=readme-ov-file#permission-loss
run: cd results && ln -s umu-run umu_run.py && tar cvf Zipapp.tar umu-run umu_run.py
run: cd results && ln -s umu-run umu_run.py && tar cvf umu-launcher-${{ github.ref_name }}-zipapp.tar.gz umu-run umu_run.py

- name: Upload artifact
uses: actions/upload-artifact@v4.0.0
uses: actions/upload-artifact@v4
with:
name: Zipapp
path: results/Zipapp.tar
name: umu-launcher-${{ github.ref_name }}-zipapp.tar.gz
path: results/umu-launcher-${{ github.ref_name }}-zipapp.tar.gz
143 changes: 143 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: Build and upload artifacts to Release

on:
release:
types: [published]


jobs:
fedora40-build:
name: Fedora 40 Build
uses: ./.github/workflows/build-umu-fedora-40.yml
fedora40-release:
name: Fedora 40 Release ${{ github.ref_name }}
needs: fedora40-build
runs-on: ubuntu-latest
steps:

- name: Download Fedora 40 umu-launcher ${{ github.ref_name }} artifact
uses: actions/download-artifact@v4
with:
name: umu-launcher-${{ github.ref_name }}.fc40.noarch.rpm

- name: Upload Fedora 40 umu-launcher ${{ github.ref_name }} to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
file: umu-launcher-${{ github.ref_name }}.fc40.noarch.rpm
overwrite: false

fedora41-build:
name: Fedora 41 Build
uses: ./.github/workflows/build-umu-fedora-41.yml
fedora41-release:
name: Fedora 41 Release ${{ github.ref_name }}
needs: fedora41-build
runs-on: ubuntu-latest
steps:

- name: Download Fedora 41 umu-launcher ${{ github.ref_name }} artifact
uses: actions/download-artifact@v4
with:
name: umu-launcher-${{ github.ref_name }}.fc41.noarch.rpm

- name: Upload Fedora 41 umu-launcher ${{ github.ref_name }} to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
file: umu-launcher-${{ github.ref_name }}.fc41.noarch.rpm
overwrite: false

debian12-build:
name: Debian 12 Build
uses: ./.github/workflows/build-umu-debian-12.yml
debian12-release:
name: Debian 12 Release ${{ github.ref_name }}
needs: debian12-build
runs-on: ubuntu-latest
steps:

- name: Download Debian 12 python3-umu-launcher ${{ github.ref_name }} artifact
uses: actions/download-artifact@v4
with:
name: python3-umu-launcher_${{ github.ref_name }}-1_amd64_debian12.deb

- name: Upload Debian 12 python3-umu-launcher ${{ github.ref_name }} to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
file: python3-umu-launcher_${{ github.ref_name }}-1_amd64_debian12.deb
overwrite: false

- name: Download Debian 12 umu-launcher ${{ github.ref_name }} artifact
uses: actions/download-artifact@v4
with:
name: umu-launcher_${{ github.ref_name }}-1_all_debian12.deb

- name: Upload Debian 12 umu-launcher ${{ github.ref_name }} to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
file: umu-launcher_${{ github.ref_name }}-1_all_debian12.deb
overwrite: false

ubuntu-noble-build:
name: Ubuntu 24.04 Build
uses: ./.github/workflows/build-umu-ubuntu-noble.yml
ubuntu-noble-release:
name: Ubuntu 24.04 Release ${{ github.ref_name }}
needs: ubuntu-noble-build
runs-on: ubuntu-latest
steps:

- name: Download Ubuntu 24.04 python3-umu-launcher ${{ github.ref_name }} artifact
uses: actions/download-artifact@v4
with:
name: python3-umu-launcher_${{ github.ref_name }}-1_amd64_ubuntu-noble.deb

- name: Upload Ubuntu 24.04 python3-umu-launcher ${{ github.ref_name }} to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
file: python3-umu-launcher_${{ github.ref_name }}-1_amd64_ubuntu-noble.deb
overwrite: false

- name: Download Ubuntu 24.04 umu-launcher ${{ github.ref_name }} artifact
uses: actions/download-artifact@v4
with:
name: umu-launcher_${{ github.ref_name }}-1_all_ubuntu-noble.deb

- name: Upload Ubuntu 24.04 umu-launcher ${{ github.ref_name }} to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
file: umu-launcher_${{ github.ref_name }}-1_all_ubuntu-noble.deb
overwrite: false

zipapp-build:
name: Zipapp Build
uses: ./.github/workflows/build-umu-zipapp.yml
zipapp-release:
name: Zippapp Release ${{ github.ref_name }}
needs: zipapp-build
runs-on: ubuntu-latest
steps:

- name: Download Fedora 41 umu-launcher ${{ github.ref_name }} artifact
uses: actions/download-artifact@v4
with:
name: umu-launcher-${{ github.ref_name }}-zipapp.tar.gz

- name: Upload Fedora 41 umu-launcher ${{ github.ref_name }} to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
file: umu-launcher-${{ github.ref_name }}-zipapp.tar.gz
overwrite: false

0 comments on commit d619c71

Please sign in to comment.