mirror of
https://git.madhouse-project.org/algernon/iocaine.git
synced 2025-03-10 17:28:49 +01:00
ci: Make the release workflow actually work
Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
This commit is contained in:
parent
c9a2899a6b
commit
2b68be87f8
1 changed files with 16 additions and 15 deletions
|
@ -13,6 +13,8 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
info:
|
info:
|
||||||
runs-on: nixos-latest
|
runs-on: nixos-latest
|
||||||
|
outputs:
|
||||||
|
pkg-version: ${{ steps.version.outputs.pkg-version }}
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -20,7 +22,7 @@ jobs:
|
||||||
- name: extract the version from the tag
|
- name: extract the version from the tag
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
echo "pkg-version=${GITHUB_REF_NAME//refs\/tags\/iocaine-}" >>"${GITHUB_OUTPUT}"
|
echo "pkg-version=${GITHUB_REF_NAME//iocaine-}" | tee -a "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
binary-static:
|
binary-static:
|
||||||
runs-on: nixos-latest
|
runs-on: nixos-latest
|
||||||
|
@ -52,8 +54,6 @@ jobs:
|
||||||
-o iocaine-${PKG_VERSION}.${{ matrix.system }}.zst
|
-o iocaine-${PKG_VERSION}.${{ matrix.system }}.zst
|
||||||
|
|
||||||
- name: upload package
|
- name: upload package
|
||||||
env:
|
|
||||||
VERSION:
|
|
||||||
run: |
|
run: |
|
||||||
curl --user :${{ secrets.DOCKER_PASSWORD }} -XDELETE \
|
curl --user :${{ secrets.DOCKER_PASSWORD }} -XDELETE \
|
||||||
https://git.madhouse-project.org/api/packages/iocaine/generic/iocaine-binaries/${PKG_VERSION}
|
https://git.madhouse-project.org/api/packages/iocaine/generic/iocaine-binaries/${PKG_VERSION}
|
||||||
|
@ -64,7 +64,9 @@ jobs:
|
||||||
|
|
||||||
container:
|
container:
|
||||||
runs-on: nixos-latest
|
runs-on: nixos-latest
|
||||||
needs: info
|
needs:
|
||||||
|
- info
|
||||||
|
- binary-static
|
||||||
env:
|
env:
|
||||||
PKG_VERSION: ${{ needs.info.outputs.pkg-version }}
|
PKG_VERSION: ${{ needs.info.outputs.pkg-version }}
|
||||||
steps:
|
steps:
|
||||||
|
@ -94,23 +96,21 @@ jobs:
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
run:
|
run: |
|
||||||
docker tag git.madhouse-project.org/iocaine/iocaine:latest \
|
docker tag git.madhouse-project.org/iocaine/iocaine:latest \
|
||||||
git.madhouse-project.org/iocaine/iocaine:${PKG_VERSION}
|
git.madhouse-project.org/iocaine/iocaine:${PKG_VERSION}
|
||||||
docker tag git.madhouse-project.org/iocaine/iocaine:${PKG_VERSION} \
|
docker tag git.madhouse-project.org/iocaine/iocaine:latest \
|
||||||
git.madhouse-project.org/iocaine/iocaine:${PKG_VERSION%.*}
|
|
||||||
docker tag git.madhouse-project.org/iocaine/iocaine:${PKG_VERSION} \
|
|
||||||
git.madhouse-project.org/iocaine/iocaine:${PKG_VERSION%%.*}
|
git.madhouse-project.org/iocaine/iocaine:${PKG_VERSION%%.*}
|
||||||
docker push git.madhouse-project.org/iocaine/iocaine:{PKG_VERSION} \
|
|
||||||
git.madhouse-project.org/iocaine/iocaine:${PKG_VERSION%.*} \
|
docker push git.madhouse-project.org/iocaine/iocaine:${PKG_VERSION}
|
||||||
git.madhouse-project.org/iocaine/iocaine:${PKG_VERSION%%.*}
|
docker push git.madhouse-project.org/iocaine/iocaine:${PKG_VERSION%%.*}
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
runs-on: nixos-latest
|
runs-on: nixos-latest
|
||||||
needs:
|
needs:
|
||||||
- info
|
- info
|
||||||
- binary-static
|
- binary-static
|
||||||
- container-image
|
- container
|
||||||
env:
|
env:
|
||||||
PKG_VERSION: ${{ needs.info.outputs.pkg-version }}
|
PKG_VERSION: ${{ needs.info.outputs.pkg-version }}
|
||||||
steps:
|
steps:
|
||||||
|
@ -124,11 +124,12 @@ jobs:
|
||||||
|
|
||||||
- name: set up forgejo-cli
|
- name: set up forgejo-cli
|
||||||
run: |
|
run: |
|
||||||
echo "${GITHUB_TOKEN}" | fj auth add-key algernon
|
echo "${GITHUB_TOKEN}" | fj auth add-key git.madhouse-project.org algernon
|
||||||
|
|
||||||
- name: publish the release
|
- name: publish the release
|
||||||
run: |
|
run: |
|
||||||
fj release create --draft \
|
fj release create \
|
||||||
--tag "iocaine-${PKG_VERSION}" \
|
--tag "iocaine-${PKG_VERSION}" \
|
||||||
--attach "iocaine-${PKG_VERSION}.x86_64-linux.zst" \
|
--attach "iocaine-${PKG_VERSION}.x86_64-linux.zst" \
|
||||||
--body "$(changelog entry "${PKG_VERSION}")"
|
--body "$(changelog entry "${PKG_VERSION}")" \
|
||||||
|
"iocaine ${PKG_VERSION}"
|
||||||
|
|
Loading…
Reference in a new issue