Skip to content

Commit 189fa98

Browse files
committed
Add insiders workflow
1 parent 3ebd6d0 commit 189fa98

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.github/release-insiders.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Release Insiders
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
12+
cancel-in-progress: true
13+
14+
env:
15+
CI: true
16+
CACHE_PREFIX: stable
17+
NODE_VERSION: 16
18+
RELEASE_CHANNEL: insiders
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
27+
- name: Use Node.js ${{ env.NODE_VERSION }}
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{ env.NODE_VERSION }}
31+
registry-url: "https://registry.npmjs.org"
32+
33+
- name: Use cached node_modules
34+
id: cache
35+
uses: actions/cache@v3
36+
with:
37+
path: node_modules
38+
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ env.CACHE_PREFIX }}-node_modules-${{ hashFiles('**/package-lock.json') }}
39+
40+
- name: Install dependencies
41+
run: npm install
42+
43+
- name: Build Prettier Plugin
44+
run: |
45+
npm run build
46+
47+
- name: Test
48+
run: |
49+
npm run test
50+
51+
- name: Resolve version
52+
id: vars
53+
run: |
54+
echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
55+
56+
- name: "Version based on commit: 0.0.0-${{ env.RELEASE_CHANNEL }}.${{ env.SHA_SHORT }}"
57+
run: npm version 0.0.0-${{ env.RELEASE_CHANNEL }}.${{ env.SHA_SHORT }} --force --no-git-tag-version
58+
59+
- name: Publish
60+
run: npm publish --tag ${{ env.RELEASE_CHANNEL }}
61+
env:
62+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)