mirror of
https://github.com/hectorm/docker-qemu-reactos
synced 2025-01-07 01:24:49 +00:00
Use "hectorm/ghaction-release" action
This commit is contained in:
parent
efd183861a
commit
d602925a09
24
.github/workflows/main.yml
vendored
24
.github/workflows/main.yml
vendored
@ -122,29 +122,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
make push-cross-manifest
|
make push-cross-manifest
|
||||||
|
|
||||||
release-github:
|
publish-github-release:
|
||||||
name: "Create GitHub release"
|
name: "Publish GitHub release"
|
||||||
if: "startsWith(github.ref, 'refs/tags/v')"
|
if: "startsWith(github.ref, 'refs/tags/v')"
|
||||||
needs: ["push-manifest"]
|
needs: ["push-manifest"]
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
permissions:
|
permissions:
|
||||||
contents: "write"
|
contents: "write"
|
||||||
steps:
|
steps:
|
||||||
- name: "Create release"
|
- name: "Publish"
|
||||||
env:
|
uses: "hectorm/ghaction-release@066200d04c3549852afa243d631ea3dc93390f68"
|
||||||
GITHUB_PAT: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
run: |
|
|
||||||
RELEASE_STATUS="$(curl -fs --proto '=https' --tlsv1.3 --globoff \
|
|
||||||
--url "https://api.github.com/repos/${GITHUB_REPOSITORY:?}/releases/tags/${GITHUB_REF_NAME:?}" \
|
|
||||||
--header "Authorization: Bearer ${GITHUB_PAT:?}" \
|
|
||||||
--header 'Accept: application/vnd.github.v3+json' \
|
|
||||||
--header 'Content-Type: application/json' \
|
|
||||||
--write-out '%{http_code}' --output /dev/null ||:)"
|
|
||||||
if [ "${RELEASE_STATUS:?}" = '200' ]; then exit 0; fi
|
|
||||||
RELEASE_ID="$(curl -fsS --proto '=https' --tlsv1.3 --globoff \
|
|
||||||
--url "https://api.github.com/repos/${GITHUB_REPOSITORY:?}/releases" \
|
|
||||||
--header "Authorization: Bearer ${GITHUB_PAT:?}" \
|
|
||||||
--header 'Accept: application/vnd.github.v3+json' \
|
|
||||||
--header 'Content-Type: application/json' \
|
|
||||||
--data "$(jq -rn --arg tag "${GITHUB_REF_NAME:?}" '{"name": $tag, "tag_name": $tag, "generate_release_notes": true}')" | jq -r '.id')"
|
|
||||||
if [ -z "${RELEASE_ID-}" ] || [ "${RELEASE_ID:?}" = 'null' ]; then exit 1; fi
|
|
||||||
|
Loading…
Reference in New Issue
Block a user