-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (49 loc) · 1.59 KB
/
Copy pathpublish.yml
File metadata and controls
61 lines (49 loc) · 1.59 KB
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
61
name: Publish snapshot
# Publishes a dev snapshot to Nexus on every push to main (upstream repo only).
# This runs only for pushes to main, never for pull requests or other branches.
on:
push:
branches: [main]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run format:check
- run: npm run type-check
- run: npm test
- run: npm run build-only
# Publish a snapshot to the `dev` tag. Upstream repo only; serialized so
# concurrent pushes don't leave `dev` on an older commit.
publish-snapshot:
needs: build
if: github.repository == 'aerius/vue-geo-components'
runs-on: ubuntu-latest
concurrency:
group: publish-snapshot
cancel-in-progress: false
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- name: Set a unique snapshot version
run: npm version "0.0.0-dev-${GITHUB_SHA::7}" --no-git-tag-version
- run: npm run build-only
- name: Encode Nexus credentials for npm
run: echo "NEXUS_AUTH=$(printf '%s' "$NEXUS_USERNAME:$NEXUS_PASSWORD" | base64 -w0)" >> "$GITHUB_ENV"
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
- name: Publish to the dev tag
run: npm publish --tag dev