-
Notifications
You must be signed in to change notification settings - Fork 138
56 lines (56 loc) · 1.57 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
name: Release
on:
workflow_dispatch:
inputs:
tag:
description: "The tag version you want to build"
schedule:
- cron: "0 8 12 * *"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ^1.22
- name: Build geoip
id: build
run: go run -v .
env:
FIXED_RELEASE: ${{ github.event.inputs.tag }}
- name: Release rule sets
if: steps.build.outputs.skip != 'true'
run: .github/release-rule-set.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate sha256 hash
if: steps.build.outputs.skip != 'true'
run: |
sha256sum geoip.db > geoip.db.sha256sum
sha256sum geoip-cn.db > geoip-cn.db.sha256sum
- name: Release release branch
if: steps.build.outputs.skip != 'true'
run: .github/release-branch.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: dev-drprasad/[email protected]
with:
keep_latest: 3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release geoip
if: steps.build.outputs.skip != 'true'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.build.outputs.tag }}
files: |
geoip.db
geoip.db.sha256sum
geoip-cn.db
geoip-cn.db.sha256sum