Skip to content

Commit

Permalink
Merge pull request #48 from keynslug/fix/release/manual-republish
Browse files Browse the repository at this point in the history
fix(release): allow republishing artifacts under existing release
  • Loading branch information
keynslug authored Jun 20, 2024
2 parents ba429dc + 7a5d667 commit 96fbd9a
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ on:
- "*"
workflow_dispatch:
inputs:
branch_or_tag:
build_from:
description: |
Branch or tag to build release artifacts from.
required: false
is_release:
release_as:
description: |
Publish release under this tag, or update release assets if such release exists.
If empty, release publishing will be skipped.
required: false
default: false
default: ""

jobs:
mac:
Expand All @@ -29,7 +34,7 @@ jobs:
with:
submodules: recursive
fetch-depth: 0
ref: ${{ github.event.inputs.branch_or_tag }} # when input is not given, the event tag is used
ref: ${{ github.event.inputs.build_from }} # when input is not given, the event tag is used

- uses: ./.github/actions/macos-erlang
with:
Expand Down Expand Up @@ -78,7 +83,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch_or_tag }} # when input is not given, the event tag is used
ref: ${{ github.event.inputs.build_from }} # when input is not given, the event tag is used

- uses: docker/setup-buildx-action@v2
- uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -108,7 +113,7 @@ jobs:
needs:
- mac
- linux
if: startsWith(github.ref, 'refs/tags/') || inputs.is_release == true
if: startsWith(github.ref, 'refs/tags/') || inputs.release_as
steps:
- uses: actions/download-artifact@v3
with:
Expand All @@ -117,6 +122,6 @@ jobs:
- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: Erlang jq NIF ${{ github.event.inputs.branch_or_tag || github.ref_name }} Released
tag_name: ${{ github.event.inputs.branch_or_tag || github.ref_name }}
name: Erlang jq NIF ${{ github.event.inputs.release_as || github.ref_name }} Released
tag_name: ${{ github.event.inputs.release_as || github.ref_name }}
files: "packages/*"

0 comments on commit 96fbd9a

Please sign in to comment.