-
Notifications
You must be signed in to change notification settings - Fork 64
36 lines (35 loc) · 1.14 KB
/
generate-release-tag.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
name: Generate Release Tag
on:
repository_dispatch:
types: [create-release-tag]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set the value in bash
id: parse-changelog
run: |
echo "changelog<<EOF" >> "$GITHUB_OUTPUT"
echo "${{ github.event.client_payload.changelog }}" | tr -s '%0A' '\n' >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Create Release
id: create-release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
with:
tag_name: v${{ github.event.client_payload.version }}
release_name: v${{ github.event.client_payload.version }}
body: ${{ steps.parse-changelog.outputs.changelog }}
draft: false
prerelease: false
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run custom-publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}