Skip to content

Commit 9734ddd

Browse files
committed
ci: publish releases automatically
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 910d67e commit 9734ddd

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

.github/workflows/publish.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches: ['main']
66
tags: ['v*.*.*']
7-
release:
8-
types: ['published']
97

108
concurrency: ${{ github.ref }}
119

@@ -233,3 +231,27 @@ jobs:
233231
repository: ${{ env.IMAGE_NAME }}
234232
readme-filepath: ./README.md
235233
short-description: "Cardano Node built from source on Debian"
234+
235+
github-release:
236+
runs-on: ubuntu-latest
237+
needs: [multi-arch-manifest]
238+
steps:
239+
- run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV"
240+
- uses: actions/github-script@v5
241+
if: startsWith(github.ref, 'refs/tags/')
242+
with:
243+
github-token: ${{ secrets.GITHUB_TOKEN }}
244+
script: |
245+
try {
246+
await github.rest.repos.createRelease({
247+
draft: false,
248+
generate_release_notes: true,
249+
name: process.env.RELEASE_TAG,
250+
owner: context.repo.owner,
251+
prerelease: false,
252+
repo: context.repo.repo,
253+
tag_name: process.env.RELEASE_TAG,
254+
});
255+
} catch (error) {
256+
core.setFailed(error.message);
257+
}

0 commit comments

Comments
 (0)