-
-
Notifications
You must be signed in to change notification settings - Fork 12
45 lines (39 loc) · 1.02 KB
/
publish-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
41
42
43
44
45
name: Publish release
on:
release:
types:
- published
- edited
jobs:
publish-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
fetch-depth: 0 # fetch full history for Git tests
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Test and create dist files
run: npm ci && npm run all
- name: Push dist to new tag
uses: teunmooij/github-versioned-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
include: |-
dist/licenses.txt
dist/index.js
README.md
LICENSE
action.yml
- name: Set release to published
uses: irongut/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: ${{ github.event.release.id }}
draft: false
prerelease: false