Update workflow to trigger on tags with gk-v* pattern #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release gh-gk Extension | |
on: | |
push: | |
tags: | |
- 'gk-v*' | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Download Binaries | |
uses: actions/download-artifact@v2 | |
with: | |
name: gh-gk-binaries | |
path: downloaded_binaries | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Assets | |
run: | | |
for binary in downloaded_binaries/*; do | |
echo "Uploading ${binary}" | |
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Content-Type: $(file -b --mime-type ${binary})" \ | |
--data-binary @${binary} \ | |
"${{ steps.create_release.outputs.upload_url }}?name=$(basename ${binary})" | |
done | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |