-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.02 KB
/
push-to-main.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
name: Build and Publish
on:
push:
branches:
- main
jobs:
build-and-deploy:
permissions:
contents: write
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: "Automated Version Bump"
uses: "phips28/gh-action-bump-version@master"
env:
GITHUB_TOKEN: ${{ github.token }}
with:
version-type: "patch"
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Create Release
id: create_release
env:
GH_TOKEN: ${{ github.token }}
run: |
version=$(jq -r .version package.json)
mv ./script ./LiveRemote
zip -r "LiveRemote-${version}.zip" ./LiveRemote
gh release create "v${version}" "LiveRemote-${version}.zip" --title "Release ${version}" --notes "This is the release for version ${version}. Check it out!"