-
-
Notifications
You must be signed in to change notification settings - Fork 20
40 lines (39 loc) · 1.14 KB
/
auto-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
40
name: AutoRelease
on:
push:
branches:
- main
jobs:
build:
name: AutoRelease
runs-on: ubuntu-latest
steps:
# checkout the code
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# setup node version
- uses: actions/[email protected]
with:
node-version: 17
# install dependencies and test
- run: npm ci
# - run: npm test
# run rollup and save dist updates back to repo
- run: npm run dist
# commit back changes to dist
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "automatically committing rollup output to dist"
file_pattern: dist/*
# publish to npm if version is different
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Automatic GitHub Release
uses: justincy/[email protected]
id: release
- name: Print release output
if: ${{ steps.release.outputs.released == 'true' }}
run: echo Release ID ${{ steps.release.outputs.release_id }}