-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (50 loc) · 1.56 KB
/
release.yaml
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
on:
push:
branches:
- master
- initial
jobs:
version:
runs-on: ubuntu-latest
env:
MAJOR_VERSION: 0
outputs:
versionSemVerOut: v${{ steps.semVer.outputs.semVersion }}
steps:
- id: semVer
run: echo "semVersion=$MAJOR_VERSION.0.${{ github.run_number }}" >> "$GITHUB_OUTPUT"
ci:
runs-on: ubuntu-latest
container: golang:1.23-bookworm
needs:
- version
env:
SEM_VERSION: ${{needs.version.outputs.versionSemVerOut}}
steps:
- name: Install zip
uses: montudor/action-zip@v1
- run: apt-get update && apt-get install -y build-essential git
- uses: actions/checkout@v4
- run: make build
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ env.SEM_VERSION }}
tag_name: ${{ env.SEM_VERSION }}
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: montudor/action-zip@v1
with:
args: zip -qq -r browser-switcher-${{ env.SEM_VERSION }}-windows-amd64.zip dist win
- name: upload windows artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: browser-switcher-${{ env.SEM_VERSION }}-windows-amd64.zip
asset_name: browser-switcher-${{ env.SEM_VERSION }}-windows-amd64.zip
asset_content_type: application/octet-stream