Skip to content

Commit ab5999d

Browse files
authored
Add a release workflow to github CI
This will allow us to remove compiled files from the repository
1 parent f4ec97f commit ab5999d

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
tags:
5+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6+
7+
name: Upload Release Asset
8+
9+
jobs:
10+
build:
11+
name: Upload Release Asset
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: mymindstorm/setup-emsdk@v1
16+
with:
17+
version: '1.38.47'
18+
- name: install coffee
19+
run: npm install --global coffeescript@1
20+
- name: make
21+
run: make
22+
- uses: actions/setup-node@v1
23+
with:
24+
registry-url: 'https://npm.pkg.github.com'
25+
- run: npm publish
26+
env:
27+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
- name: Create Release
29+
id: create_release
30+
uses: actions/[email protected]
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
with:
34+
tag_name: ${{ github.ref }}
35+
release_name: Release ${{ github.ref }}
36+
draft: false
37+
prerelease: false
38+
- name: zip artifacts
39+
run: zip --junk-paths ./sqljs.zip dist/*
40+
- name: Upload Release Asset
41+
id: upload-release-asset
42+
uses: actions/[email protected]
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
with:
46+
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
47+
asset_path: ./sqljs.zip
48+
asset_name: sqljs.zip
49+
asset_content_type: application/zip

0 commit comments

Comments
 (0)