Skip to content

Commit

Permalink
Use another action to generate releases
Browse files Browse the repository at this point in the history
It looks like we're hitting some races in GitHub when trying to update a
release.

Issue: #428
  • Loading branch information
mlopatkin committed Jan 25, 2025
1 parent a76804a commit dfa4351
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 68 deletions.
4 changes: 2 additions & 2 deletions .github/versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#

ANDLOGVIEW_ENV_VERSION=sha256:5d34e961a07019b09599025c5de65f3e7d6a44b80072f92114e35bde212e41b8
# ncipollo/release-action
RELEASE_ACTION_VERSION=cdcc88a9acf3ca41c16c37bb7d21b9ad48560d87 # v1.15.0
# softprops/action-gh-release
RELEASE_ACTION_VERSION=c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
# gradle/gradle-build-action
GRADLE_BUILD_ACTION_VERSION=842c587ad8aa4c68eeba24c396e15af4c2e9f30a # 2.9.0
DOCKER_LOGIN_ACTION_VERSION=343f7c4344506bcbf9b4de18042ae17996df046d # v3.0
Expand Down
42 changes: 15 additions & 27 deletions .github/workflow-templates/includes/releases.ftlh
Original file line number Diff line number Diff line change
@@ -1,43 +1,31 @@
<#macro createRelease tag prerelease="true">
uses: ncipollo/release-action@[=RELEASE_ACTION_VERSION]
uses: softprops/action-gh-release@[=RELEASE_ACTION_VERSION]
if: ${{ success() }}
with:
allowUpdates: false
bodyFile: docs/releases/release_0.24.md # This is a temporary location
makeLatest: false
body_path: docs/releases/release_0.24.md # This is a temporary location
draft: true
prerelease: [=prerelease]
removeArtifacts: true
tag: [=tag]
updateOnlyUnreleased: true
tag_name: [=tag]
generate_release_notes: false
make_latest: false
</#macro>
<#macro publishArtifacts tag>
uses: ncipollo/release-action@[=RELEASE_ACTION_VERSION]
uses: softprops/action-gh-release@[=RELEASE_ACTION_VERSION]
if: ${{ success() }}
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: build/distributions/*
omitBody: true
omitDraftDuringUpdate: true
omitName: true
omitPrereleaseDuringUpdate: true
removeArtifacts: false
replacesArtifacts: false
tag: [=tag]
updateOnlyUnreleased: true
files: build/distributions/*
tag_name: [=tag]
fail_on_unmatched_files: true
generate_release_notes: false
make_latest: false
</#macro>
<#macro publishRelease tag prerelease="true">
uses: ncipollo/release-action@[=RELEASE_ACTION_VERSION]
uses: softprops/action-gh-release@[=RELEASE_ACTION_VERSION]
if: ${{ success() }}
with:
allowUpdates: true
draft: false
omitBody: true
omitName: true
prerelease: [=prerelease]
removeArtifacts: false
replacesArtifacts: false
tag: [=tag]
updateOnlyUnreleased: true
tag_name: [=tag]
generate_release_notes: false
make_latest: false
</#macro>
60 changes: 21 additions & 39 deletions .github/workflows/releasing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,32 +48,24 @@ jobs:
run: |
tools/remove-release.sh "latest-snapshot" "$GITHUB_REPOSITORY"
- name: Create new release
uses: ncipollo/release-action@cdcc88a9acf3ca41c16c37bb7d21b9ad48560d87 # v1.15.0
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
if: ${{ success() }}
with:
allowUpdates: false
bodyFile: docs/releases/release_0.24.md # This is a temporary location
makeLatest: false
body_path: docs/releases/release_0.24.md # This is a temporary location
draft: true
prerelease: true
removeArtifacts: true
tag: latest-snapshot
updateOnlyUnreleased: true
tag_name: latest-snapshot
generate_release_notes: false
make_latest: false
- name: Publish Linux and cross-platform installers
uses: ncipollo/release-action@cdcc88a9acf3ca41c16c37bb7d21b9ad48560d87 # v1.15.0
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
if: ${{ success() }}
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: build/distributions/*
omitBody: true
omitDraftDuringUpdate: true
omitName: true
omitPrereleaseDuringUpdate: true
removeArtifacts: false
replacesArtifacts: false
tag: latest-snapshot
updateOnlyUnreleased: true
files: build/distributions/*
tag_name: latest-snapshot
fail_on_unmatched_files: true
generate_release_notes: false
make_latest: false

build-snapshot-win:
runs-on: windows-latest
Expand Down Expand Up @@ -102,20 +94,14 @@ jobs:
--stacktrace
windowsInstallers
- name: Add Windows Installers to release
uses: ncipollo/release-action@cdcc88a9acf3ca41c16c37bb7d21b9ad48560d87 # v1.15.0
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
if: ${{ success() }}
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: build/distributions/*
omitBody: true
omitDraftDuringUpdate: true
omitName: true
omitPrereleaseDuringUpdate: true
removeArtifacts: false
replacesArtifacts: false
tag: latest-snapshot
updateOnlyUnreleased: true
files: build/distributions/*
tag_name: latest-snapshot
fail_on_unmatched_files: true
generate_release_notes: false
make_latest: false

publish-snapshot-release:
runs-on: ubuntu-latest
Expand All @@ -126,18 +112,14 @@ jobs:
if: github.ref == 'refs/heads/master'
steps:
- name: Publish draft release as pre-release
uses: ncipollo/release-action@cdcc88a9acf3ca41c16c37bb7d21b9ad48560d87 # v1.15.0
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
if: ${{ success() }}
with:
allowUpdates: true
draft: false
omitBody: true
omitName: true
prerelease: true
removeArtifacts: false
replacesArtifacts: false
tag: latest-snapshot
updateOnlyUnreleased: true
tag_name: latest-snapshot
generate_release_notes: false
make_latest: false

build-release:
runs-on: ubuntu-latest
Expand Down

0 comments on commit dfa4351

Please sign in to comment.