forked from openziti/ziti-console
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.92 KB
/
releases.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
53
54
55
56
57
58
59
60
61
62
63
on:
release:
types: [created]
name: Create Releases
jobs:
build-and-publish-app-ziti-console:
if: startsWith(github.event.release.name, 'app-ziti-console-v')
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
BUILD_CONFIG: "Release"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
- name: build and upload ziti-console.zip as SPA for use with controller
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
run: |
./build.sh /zac/
cd dist/app-ziti-console && zip -r ziti-console.zip *
gh release upload ${{github.event.release.tag_name}} ziti-console.zip
build-and-publish-ziti-console-lib:
if: startsWith(github.event.release.name, 'ziti-console-lib-v')
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
BUILD_CONFIG: "Release"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Set VERSION Environment Variable
run: echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
- name: Set VERSION Environment Variable
run: |
VERSION=$(echo "${{ github.event.release.name }}" | grep -oP '^.*-v(.*)$')
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Test branch name
run: |
echo "echo ${GITHUB_REF#refs/heads/}"
id: extract_branch
- name: Build and Publish Shared Library - ziti-console-lib
if: true
run: ./publishSharedLib.sh
- name: Publish production release
if: true
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}