-
Notifications
You must be signed in to change notification settings - Fork 31
60 lines (49 loc) · 1.68 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#
# GitHub Actions workflow.
#
# Releases the package to npm when a push into main is detected.
# * Checkout the code
# * Install Node.js
# * Install dependencies
# * Pull the latest changes
# * Bump version number
# * Release to NPM
#
name: 'Release Package: Llana'
on:
push:
branches:
- main
workflow_dispatch:
jobs:
release:
name: 'Release Package: CLI'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_CI_CD_RELEASE }}
- name: 'Install Node.js'
uses: actions/setup-node@v4
with:
node-version: 18.18.2
- name: 'Install dependencies'
run: npm install
- run: git pull --force
- name: 'Version Bump'
uses: phips28/gh-action-bump-version@master
env:
GITHUB_TOKEN: ${{ secrets.GH_CI_CD_RELEASE }}
with:
major-wording: 'JLMAJOR'
minor-wording: 'feature,feat'
patch-wording: 'patch,fixes,fix,misc,docs,refactor' # Providing patch-wording will override commits
commit-message: 'Release Package: CLI Bump Version [skip ci]'
skip-tag: true
- name: 'Authenticate with NPM'
run: echo -e "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- name: 'Publishing package'
run: npm publish --no-git-checks --access public