mirror of
https://github.com/quickemu-project/quickemu.git
synced 2024-06-02 04:55:50 +02:00
ci: refactor publish-release.yml
All release operations in a single workflow
This commit is contained in:
parent
945933d5f4
commit
7c892c9dc2
28
.github/workflows/publish-flakehub.yml
vendored
28
.github/workflows/publish-flakehub.yml
vendored
|
@ -1,28 +0,0 @@
|
|||
name: "Publish FlakeHub ❄️"
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v?[0-9]+.[0-9]+.[0-9]+*"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "The existing tag to publish to FlakeHub"
|
||||
type: "string"
|
||||
required: true
|
||||
jobs:
|
||||
flakehub-publish:
|
||||
runs-on: "ubuntu-22.04"
|
||||
permissions:
|
||||
id-token: "write"
|
||||
contents: "read"
|
||||
steps:
|
||||
- uses: "actions/checkout@v3"
|
||||
with:
|
||||
ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}"
|
||||
- uses: "DeterminateSystems/nix-installer-action@main"
|
||||
- uses: "DeterminateSystems/magic-nix-cache-action@main"
|
||||
- uses: "DeterminateSystems/flakehub-push@main"
|
||||
with:
|
||||
visibility: "public"
|
||||
name: "quickemu-project/quickemu"
|
||||
tag: "${{ inputs.tag }}"
|
36
.github/workflows/publish-ppa.yml
vendored
36
.github/workflows/publish-ppa.yml
vendored
|
@ -1,36 +0,0 @@
|
|||
name: Publish PPA 📦️
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
publish-ppa:
|
||||
name: Publish PPA
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Import gpg key
|
||||
uses: crazy-max/ghaction-import-gpg@v6
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.PPA_GPG_PASSPHRASE }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install debhelper-compat distro-info dput devscripts
|
||||
- name: Publish to PPA
|
||||
env:
|
||||
DEBEMAIL: ${{ secrets.DEBEMAIL }}
|
||||
DEBFULLNAME: ${{ secrets.DEBFULLNAME }}
|
||||
run: |
|
||||
REL_VER=$(grep "^readonly VERSION" quickemu | cut -d'"' -f2)
|
||||
STAMP=$(date +%y%j.%H%M)
|
||||
for CODENAME in $(distro-info --supported); do
|
||||
rm debian/changelog
|
||||
dch --package quickemu --newversion="${REL_VER}-1~${CODENAME}${STAMP}" --distribution=${CODENAME} "New upstream release." --create
|
||||
dpkg-buildpackage -d -S -sa
|
||||
dput ppa:flexiondotorg/quickemu ../quickemu_${REL_VER}-1~${CODENAME}${STAMP}_source.changes
|
||||
done
|
68
.github/workflows/publish-release.yml
vendored
68
.github/workflows/publish-release.yml
vendored
|
@ -2,11 +2,18 @@ name: Publish Release 🏷️
|
|||
|
||||
on:
|
||||
push:
|
||||
tags: ['*']
|
||||
tags:
|
||||
- "v?[0-9]+.[0-9]+.[0-9]+*"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "The existing tag to publish"
|
||||
type: "string"
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
create-release:
|
||||
name: Create Release
|
||||
draft-release:
|
||||
name: "Draft Release 📥️"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
@ -17,8 +24,8 @@ jobs:
|
|||
gh release create "${{ github.ref }}" --draft --generate-notes
|
||||
|
||||
build-release:
|
||||
needs: [create-release]
|
||||
name: Build Release
|
||||
needs: [draft-release]
|
||||
name: "Build Release 👨🔧"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
@ -36,7 +43,7 @@ jobs:
|
|||
|
||||
publish-release:
|
||||
needs: [build-release]
|
||||
name: Publish Release
|
||||
name: "Publish Release 📤️"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
@ -48,3 +55,52 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
gh release edit "${{ github.ref }}" --draft=false
|
||||
|
||||
publish-flakehub:
|
||||
name: "Publish FlakeHub ❄️"
|
||||
runs-on: "ubuntu-22.04"
|
||||
permissions:
|
||||
id-token: "write"
|
||||
contents: "read"
|
||||
steps:
|
||||
- uses: "actions/checkout@v4"
|
||||
with:
|
||||
ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}"
|
||||
- uses: "DeterminateSystems/nix-installer-action@main"
|
||||
- uses: "DeterminateSystems/magic-nix-cache-action@main"
|
||||
- uses: "DeterminateSystems/flakehub-push@main"
|
||||
with:
|
||||
visibility: "public"
|
||||
name: "quickemu-project/quickemu"
|
||||
tag: "${{ inputs.tag }}"
|
||||
|
||||
publish-ppa:
|
||||
name: "Publish PPA 📦️"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: "Checkout 🥡"
|
||||
uses: actions/checkout@v4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: "Import gpg key 🔑"
|
||||
uses: crazy-max/ghaction-import-gpg@v6
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.PPA_GPG_PASSPHRASE }}
|
||||
- name: "Install dependencies 💾"
|
||||
run: |
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install debhelper-compat distro-info dput devscripts
|
||||
- name: "Upload to PPA ⤴️"
|
||||
env:
|
||||
DEBEMAIL: ${{ secrets.DEBEMAIL }}
|
||||
DEBFULLNAME: ${{ secrets.DEBFULLNAME }}
|
||||
run: |
|
||||
REL_VER=$(grep "^readonly VERSION" quickemu | cut -d'"' -f2)
|
||||
STAMP=$(date +%y%j.%H%M)
|
||||
for CODENAME in $(distro-info --supported); do
|
||||
rm debian/changelog
|
||||
dch --package quickemu --newversion="${REL_VER}-1~${CODENAME}${STAMP}" --distribution=${CODENAME} "New upstream release." --create
|
||||
dpkg-buildpackage -d -S -sa
|
||||
dput ppa:flexiondotorg/quickemu ../quickemu_${REL_VER}-1~${CODENAME}${STAMP}_source.changes
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue
Block a user