-
-
Notifications
You must be signed in to change notification settings - Fork 22
39 lines (37 loc) · 1.37 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0.0
name: Create Release
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Set RELEASE_VERSION environment variable
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
- uses: actions/setup-node@master
with:
node-version: '13.x'
- run: npm install
- run: npm run build
- name: Publish to NPM
run: |
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
npm publish --ignore-scripts --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create artifact
run: |
mkdir ${{ env.RELEASE_VERSION }}-dist && cp dist/farmOS-map* ${{ env.RELEASE_VERSION }}-dist && zip -r ${{ env.RELEASE_VERSION }}-dist.zip ${{ env.RELEASE_VERSION }}-dist
- name: Create Release
uses: softprops/action-gh-release@6034af24fba4e5a8e975aaa6056554efe4c794d0 #0.1.13
with:
body: |
See [CHANGELOG.md](https://github.com/farmOS/farmOS-map/blob/${{ env.RELEASE_VERSION }}/CHANGELOG.md) for release notes.
files: ${{ env.RELEASE_VERSION }}-dist.zip
draft: false
prerelease: false