Skip to content

Commit f64911a

Browse files
authored
Merge pull request #28 from cloudstruct/ci/publish-releases-automatically
ci: publish releases automatically
2 parents 38d7a3c + 9734ddd commit f64911a

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

.github/workflows/publish.yml

+24-2
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

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

0 commit comments

Comments
 (0)