forked from jameslan/libxml2-wasm
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.26 KB
/
release.yml
File metadata and controls
44 lines (44 loc) · 1.26 KB
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
name: Release and Publish
on:
workflow_dispatch:
inputs:
version:
description: Version of the release, need to be identical to the version in package.json
title:
description: Title of the release
note:
description: Release note in Markdown format
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: verify version
run: test $(jq -r .version package.json) = ${{ inputs.version }}
build:
uses: ./.github/workflows/build.yml
needs: check
release:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: create release
uses: ncipollo/release-action@v1
with:
name: ${{ inputs.title }}
body: ${{ inputs.note }}
tag: v${{ inputs.version }}
artifacts: ./artifact/*
commit: ${{ github.sha }}
token: ${{ secrets.RELEASE_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: 20.x
registry-url: https://registry.npmjs.org
- run: npm publish ./artifact/libxml2-wasm-*.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}