-
Notifications
You must be signed in to change notification settings - Fork 3
74 lines (72 loc) · 2.86 KB
/
Copy pathrelease.yml
File metadata and controls
74 lines (72 loc) · 2.86 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
62
63
64
65
66
67
68
69
70
71
72
73
74
# github workflow to make a release
name: Create release based on a tag
on:
push:
tags:
- 'v*' # Trigger when a tag like v1.0.0 is pushed
permissions:
contents: write # Grants write permission to repository contents
jobs:
release:
name: Release pushed tag
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout
uses: actions/checkout@v4
# Same staging as deploy.yml: the /firmware-loader/boards content
# is never checked in, so pull it from the firmware repo before
# the build or the released site 404s on all firmware loader data.
- name: Checkout firmware-loader content (XRP_Firmware)
uses: actions/checkout@v4
with:
# Change repository/ref to a fork or branch to ship unreleased firmware
repository: Open-STEM/XRP_Firmware
path: xrp-firmware
- name: Stage firmware-loader boards content
run: |
rm -rf public/firmware-loader/boards
cp -r xrp-firmware/boards public/firmware-loader/boards
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm install
- name: test
run: npm run test
- name: Build
run: npm run build
env:
GOOGLE_AUTH_URL: ${{ vars.GOOGLE_AUTH_URL }}
GOOGLE_CHATAPI_PROXY_TARGET: ${{ vars.GOOGLE_CHATAPI_PROXY_TARGET }}
GOOGLE_REDIRECT_URI: ${{ vars.GOOGLE_REDIRECT_URI }}
- name: Archive site content
uses: thedoctor0/zip-release@master
with:
type: 'tar'
directory: './dist'
filename: ../xrpweb-v${{ github.run_number }}.zip
- name: Debug - List files
run: |
ls -la
ls -la dist/
- name: Create Release
id: create_new_release
uses: softprops/action-gh-release@v2.3.3
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Build artifacts
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: xrpweb-v${{ github.run_number }}.zip
asset_name: artifacts.zip
tag: ${{ github.ref }}
overwrite: true