-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (35 loc) · 1.33 KB
/
publish-packages.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
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: release npm packages
on:
workflow_dispatch:
jobs:
build_linux:
environment: release
runs-on: ubuntu-latest
if: contains('kingoftac,bheston,nicholasrice', github.actor)
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- name: Check for the presence of changed files inside ./change
run: npm run checkchange
- name: Build Packages
run: |
npm run build
- name: Set Git Credentials
run: |
git config --global user.name "${{ vars.CI_SERVICE_NAME }}"
git config --global user.email "${{ vars.CI_SERVICE_EMAIL }}"
git remote set-url origin "https://$REPO_PAT@github.com/Adaptive-Web-Community/Adaptive-Web-Components"
env:
REPO_PAT: ${{ secrets.REPO_PAT }}
- name: Publish to NPM
run: npm run publish-ci -n "$NODE_AUTH_TOKEN"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}