actions: create release based on version number, not tag name

This commit is contained in:
Jens Langhammer 2020-01-02 14:46:44 +01:00
parent 6207226bdf
commit 264d43827a
2 changed files with 10 additions and 5 deletions

View File

@ -1,8 +1,6 @@
name: passbook-release
on:
release:
types:
- created
release
jobs:
# Build

View File

@ -31,6 +31,13 @@ jobs:
helm dependency update helm/
helm package helm/
mv passbook-*.tgz passbook-chart.tgz
- name: Extract verison number
id: get_version
uses: actions/github-script@0.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
return context.payload.ref.replace(/\/refs\/tags\/version\//, '');
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
@ -38,10 +45,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
release_name: Release ${{ steps.get_version.outputs.result }}
draft: false
prerelease: false
- name: Create Release from Tag
- name: Upload packaged Helm Chart
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
env: