Skip to content

Commit

Permalink
Merge pull request #5 from sylcastaing/release-configuration
Browse files Browse the repository at this point in the history
[release-configuration] add Github Actions release configuration
  • Loading branch information
sylcastaing authored Nov 17, 2019
2 parents 01cb31a + 16471db commit 158f5fe
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Create zip package
run: |
zip --junk-paths artifact ./dist/qubino-flush-wire-pilot.js README.md
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./artifact.zip
asset_name: qubino-flush-wire-pilot-${{ github.ref }}.zip
asset_content_type: application/zip

0 comments on commit 158f5fe

Please sign in to comment.