generated from lokalise/npm-package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (32 loc) · 1.07 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
name: Release
on:
push:
branches:
- main
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4 # This action checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it.
with:
ref: main
fetch-depth: 0
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.x
registry-url: "https://registry.npmjs.org" # This registry URL is necessary for publishing on NPM
- name: Install Dependencies
run: npm ci
- name: Build Package
run: npm run build
- name: Release Package
env:
HUSKY: 0 # skip the husky hooks
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # should be set in Github repo, need this to publish on NPM
GITHUB_TOKEN: ${{ secrets.PLATFORM_READ_PRIVATE_REPOS }} # automatically provided by Github Actions, need this to create a GitHub Release
run: |
npx semantic-release