Skip to content

Commit 5727602

Browse files
authored
Merge pull request #1 from symm/main
Automate the build / release process
2 parents ca90d35 + 1dcba96 commit 5727602

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

.github/workflows/build.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: build app
2+
on:
3+
push:
4+
tags:
5+
- "*"
6+
7+
concurrency:
8+
group: ${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
build:
13+
name: Build
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repo
18+
uses: actions/checkout@v3
19+
- name: Setup Node
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 20
23+
- name: Install dependencies
24+
run: npm install
25+
- name: Production build
26+
run: npx vite build
27+
28+
- name: Package release tarball
29+
if: startsWith(github.ref, 'refs/tags/')
30+
run: tar jcvf mrext-client.tar.gz -C ./build .
31+
- name: Create release
32+
uses: softprops/action-gh-release@v1
33+
if: startsWith(github.ref, 'refs/tags/')
34+
with:
35+
files: mrext-client.tar.gz
36+
fail_on_unmatched_files: true
37+
38+
permissions:
39+
contents: write

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ yarn-error.log*
2424

2525
.vscode
2626
.idea
27+
28+
mrext-client.tar.gz

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,8 @@ These libraries are installed automatically but are notable:
4040
1. Run `vite build` to build the app
4141
2. Copy the entire `build` directory to `cmd/remote/_client` in the Remote
4242
repository
43+
44+
### Publishing a release
45+
46+
1. Create a tag `git tag vx.x` with your chosen version number
47+
2. Push the tag: `git push origin --tags`

0 commit comments

Comments
 (0)