Skip to content

Commit

Permalink
Add release workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrstegeman committed Oct 16, 2020
1 parent cd56882 commit 8a85ed9
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 8
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV
- name: Package project
run: |
./package.sh
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ env.RELEASE_VERSION }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: nanoleaf-adapter-${{ env.RELEASE_VERSION }}.tgz
asset_name: nanoleaf-adapter-${{ env.RELEASE_VERSION }}.tgz
asset_content_type: application/gnutar
- name: Upload Release Asset Checksum
id: upload-release-asset-checksum
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: nanoleaf-adapter-${{ env.RELEASE_VERSION }}.tgz.sha256sum
asset_name: nanoleaf-adapter-${{ env.RELEASE_VERSION }}.tgz.sha256sum
asset_content_type: text/plain

0 comments on commit 8a85ed9

Please sign in to comment.