-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (57 loc) · 1.8 KB
/
release.yml
File metadata and controls
69 lines (57 loc) · 1.8 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
name: release
on:
pull_request:
types:
- closed
branches:
- main
jobs:
release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Install dependencies
run: npm ci
- name: Get current version
id: get_version
run: |
VERSION=$(npm version --json | jq -r .version)
echo "current_version=$VERSION" >> $GITHUB_OUTPUT
- name: Increment version
id: increment_version
run: |
git config user.name github-actions
git config user.email github-actions@github.com
NEW_VERSION=$(npm version patch --json)
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tags: true
- name: Build
run: npm run foxglove:dev
- name: Create .foxe file
run: |
npm run foxglove:package
- name: Create GitHub Release
id: create_release
run: |
gh release create ${{ steps.increment_version.outputs.new_version }} --notes "Release ${{ steps.increment_version.outputs.new_version }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload .foxe file
run: |
gh release upload ${{ steps.increment_version.outputs.new_version }} ibisssl.foxglove-crane-visualizer-[0-9]*.[0-9]*.[0-9]*.foxe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}