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:
|
||||
info:
|
||||
runs-on: nixos-latest
|
||||
outputs:
|
||||
pkg-version: ${{ steps.version.outputs.pkg-version }}
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
@ -20,7 +22,7 @@ jobs:
|
|||
- name: extract the version from the tag
|
||||
id: version
|
||||
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:
|
||||
runs-on: nixos-latest
|
||||
|
@ -52,8 +54,6 @@ jobs:
|
|||
-o iocaine-${PKG_VERSION}.${{ matrix.system }}.zst
|
||||
|
||||
- name: upload package
|
||||
env:
|
||||
VERSION:
|
||||
run: |
|
||||
curl --user :${{ secrets.DOCKER_PASSWORD }} -XDELETE \
|
||||
https://git.madhouse-project.org/api/packages/iocaine/generic/iocaine-binaries/${PKG_VERSION}
|
||||
|
@ -64,7 +64,9 @@ jobs:
|
|||
|
||||
container:
|
||||
runs-on: nixos-latest
|
||||
needs: info
|
||||
needs:
|
||||
- info
|
||||
- binary-static
|
||||
env:
|
||||
PKG_VERSION: ${{ needs.info.outputs.pkg-version }}
|
||||
steps:
|
||||
|
@ -94,23 +96,21 @@ jobs:
|
|||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: publish
|
||||
run:
|
||||
run: |
|
||||
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%.*}
|
||||
docker tag 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 tag git.madhouse-project.org/iocaine/iocaine:latest \
|
||||
git.madhouse-project.org/iocaine/iocaine:${PKG_VERSION%%.*}
|
||||
|
||||
docker push git.madhouse-project.org/iocaine/iocaine:${PKG_VERSION}
|
||||
docker push git.madhouse-project.org/iocaine/iocaine:${PKG_VERSION%%.*}
|
||||
|
||||
publish:
|
||||
runs-on: nixos-latest
|
||||
needs:
|
||||
- info
|
||||
- binary-static
|
||||
- container-image
|
||||
- container
|
||||
env:
|
||||
PKG_VERSION: ${{ needs.info.outputs.pkg-version }}
|
||||
steps:
|
||||
|
@ -124,11 +124,12 @@ jobs:
|
|||
|
||||
- name: set up forgejo-cli
|
||||
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
|
||||
run: |
|
||||
fj release create --draft \
|
||||
fj release create \
|
||||
--tag "iocaine-${PKG_VERSION}" \
|
||||
--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