-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (52 loc) · 1.63 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
56
57
58
59
60
61
name: goreleaser
on:
push:
# run only against tags
tags:
- "v*"
permissions:
contents: write
# packages: write
# issues: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: pull repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: git fetch
run: git fetch --force --tags
- name: setup go
uses: actions/setup-go@v4
with:
go-version: stable
- name: set version in main.go
run: sed -i "s/rest.StartServer(c.Port, \"1.0.0\")/rest.StartServer(c.Port, \"$(git tag | sort -Vr | head -n 1)\")/g" $PWD/main.go
- name: build go
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean --skip-publish --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: innosetup
run: |
cp ./dist/hyper-v-rest-ps_windows_amd64_v1/hyper-v-rest-ps.exe packaging/hyper-v-rest-ps.exe
cd packaging/
docker build . --security-opt label=disable -t inno:64bit
bash ./iscc.sh 64 innosetup.iss
mv hyper-v-rest-ps.exe hyper-v-rest-ps-portable.exe
- name: upload release
id: create_release
uses: marvinpinto/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
title: Release ${{ github.ref }}
draft: false
prerelease: false
files: |
./packaging/hyper-v-rest-ps-portable.exe
./packaging/Output/hyper-v-rest-ps-setup.exe