-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (35 loc) · 1.12 KB
/
publish.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
name: 'Publish'
on:
workflow_dispatch:
inputs:
version:
description: 'version (without v prefix)'
required: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
always-auth: true
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile
- name: Set Git credentials
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- run: yarn version --new-version ${{ github.event.inputs.version }} --no-commit-hooks
- name: Pushing changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Publushing release
run: yarn publish --access public --non-interactive
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_PUBLISH_TOKEN }}