Skip to content

Commit

Permalink
Merge pull request #28 from cloudstruct/ci/publish-releases-automatic…
Browse files Browse the repository at this point in the history
…ally

ci: publish releases automatically
  • Loading branch information
wolf31o2 authored Sep 14, 2022
2 parents 38d7a3c + 9734ddd commit f64911a
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches: ['main']
tags: ['v*.*.*']
release:
types: ['published']

concurrency: ${{ github.ref }}

Expand Down Expand Up @@ -241,3 +239,27 @@ jobs:
repository: ${{ env.IMAGE_NAME }}
readme-filepath: ./README.md
short-description: "Cardano Node built from source on Debian"

github-release:
runs-on: ubuntu-latest
needs: [multi-arch-manifest]
steps:
- run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV"
- uses: actions/github-script@v5
if: startsWith(github.ref, 'refs/tags/')
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
await github.rest.repos.createRelease({
draft: false,
generate_release_notes: true,
name: process.env.RELEASE_TAG,
owner: context.repo.owner,
prerelease: false,
repo: context.repo.repo,
tag_name: process.env.RELEASE_TAG,
});
} catch (error) {
core.setFailed(error.message);
}

0 comments on commit f64911a

Please sign in to comment.