-
Notifications
You must be signed in to change notification settings - Fork 7
86 lines (70 loc) · 2.26 KB
/
release.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
name: "tagged-release"
on:
push:
tags:
- "v*"
jobs:
tagged-release:
name: "Tagged Release"
runs-on: "ubuntu-latest"
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.18
- name: Check out repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 16
cache: npm
cache-dependency-path: ui/package-lock.json
- name: Make sure tag version matches package.json
run: |
if [ $(git tag) != v$(cd ui && node print-version.js) ]; then
echo "::error file=ui/package.json::Tag does not match package.json version"
exit 1
fi
- name: Build adash platform binaries
run: make bin
- name: Build container image
run: docker build . -t altinity-dashboard:latest -t altinity-dashboard:$(cd ui && node print-version.js)
- name: Create the release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
files: |
bin/*
- name: Log in to GitHub registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for container image
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/altinity/altinity-dashboard
- name: Push to GitHub registry
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Bump the package.json version number
run: (cd ui && npm version patch)
- name: Create pull request bumping the version number
uses: peter-evans/create-pull-request@v7
with:
commit-message: 'Automatic version number bump after release'
title: 'Automatic version number bump after release'
base: main
branch: version_update
delete-branch: true