Skip to content

Commit e2b0b94

Browse files
authored
Merge pull request #56 from blinklabs-io/ci/publish-fix
ci: get version correctly for release
2 parents f553b98 + e514c23 commit e2b0b94

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ jobs:
1919
outputs:
2020
RELEASE_ID: ${{ steps.create-release.outputs.result }}
2121
steps:
22-
- run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV"
22+
- name: Checkout code
23+
uses: actions/checkout@v3
24+
25+
- name: Get current version
26+
id: cversion
27+
run: echo "::set-output name=version::$(grep version galaxy.yml | sed -e 's:^.* ::')"
28+
2329
- uses: actions/github-script@v6
2430
id: create-release
2531
with:
@@ -30,11 +36,11 @@ jobs:
3036
const response = await github.rest.repos.createRelease({
3137
draft: true,
3238
generate_release_notes: true,
33-
name: process.env.RELEASE_TAG,
39+
name: '${{ steps.cversion.outputs.version }}',
3440
owner: context.repo.owner,
3541
prerelease: false,
3642
repo: context.repo.repo,
37-
tag_name: process.env.RELEASE_TAG,
43+
tag_name: '${{ steps.cversion.outputs.version }}',
3844
});
3945
4046
return response.data.id;

0 commit comments

Comments
 (0)