-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (52 loc) · 1.35 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
name: Build and Test
permissions:
contents: write
on:
push:
tags:
- 'v*'
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest ]
# os: [ ubuntu-latest, windows-latest, macOS-latest ]
# arch: [ amd64, arm64, i386 ]
# exclude:
# - os: windows-latest
# arch: arm64
# - os: windows-latest
# arch: i386
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.2'
- name: Install dependencies
run: go get .
- name: Build
run: go build -v ./...
- name: Archive
run: |
tar -czf ./scan2epub.tar.gz scan2epub README.md install.sh
- name: Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body_path: CHANGELOG.md
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: ./scan2epub.tar.gz
asset_name: scan2epub.tar.gz
asset_content_type: application/gzip