-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (37 loc) · 1.09 KB
/
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
46
name: Release
on:
workflow_dispatch: # Allows manual triggering from the GitHub Actions UI
push:
tags:
- 'v*.*.*' # Triggers on tags matching the pattern 'vX.X.X'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Generate .npmrc
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Setup git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "marianfoo"
- name: Log git status and diff
run: |
echo "Checking git status..."
git status
echo "Checking git diff..."
git diff
- name: Create Release
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}