forked from actions-rs/clippy-check
-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (44 loc) · 1.28 KB
/
test-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
name: Test Release (do a dry run)
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
on:
workflow_dispatch: # releasing is manual as we don't want to release every time
permissions:
contents: write
issues: read
pull-requests: read
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Only on main
if: github.ref != 'refs/heads/main'
shell: bash
run: |
echo "Only to be executed on main"
exit 1
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
show-progress: false
- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: ".nvmrc"
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- name: Install dependencies
shell: bash
run: |
npm ci --ignore-scripts
- name: Release
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_TO_TRIGGER_SUBSEQUENT_WORKFLOWS }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run release -- --dry-run