-
Notifications
You must be signed in to change notification settings - Fork 9
37 lines (35 loc) · 1.16 KB
/
pre-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
name: Pre-Release
on:
push:
branches:
- 'release/**'
jobs:
increment-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Assign version to RELEASE_VERSION environment variable
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/*/}" >> $GITHUB_ENV
- name: Bump npm package version
run: npm version $RELEASE_VERSION --no-git-tag-version --allow-same-version
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: plugin
# Disabling this for now. It works locally? 🤷
# - name: Generate changelog
# run: npx -y conventional-changelog-cli -p conventionalcommits -i CHANGELOG.md -s -k plugin/package.json
- name: Push version bump and changelog commit
uses: EndBug/add-and-commit@v9
- name: Generate .npmrc
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
working-directory: plugin
- name: Validate Publish Flow
run: |
npm install
npm publish --dry-run
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: plugin