Skip to content

Commit 2e448fe

Browse files
committed
release ci workflow
1 parent b7dc71b commit 2e448fe

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

.github/workflows/release.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
build:
10+
name: Build
11+
# https://github.com/actions/virtual-environments/
12+
runs-on: ubuntu-22.04
13+
steps:
14+
15+
- name: 🛎️ Checkout
16+
uses: actions/checkout@v4
17+
18+
# https://github.com/marketplace/actions/setup-go-environment
19+
- name: 🔧 Setup go
20+
uses: actions/setup-go@v5
21+
22+
- name: 🍳 Build
23+
run: make
24+
25+
- name: 🌡️ Test
26+
run: ./offline-map-tile-downloader --help
27+
28+
# Upload binaries
29+
# https://github.com/marketplace/actions/upload-a-build-artifact
30+
- name: 📤 Upload
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: offline-map-tile-downloader-artifact
34+
path: offline-map-tile-downloader-*
35+
retention-days: 1
36+
37+
test-linux:
38+
name: Test Linux
39+
needs: build
40+
runs-on: ubuntu-latest
41+
steps:
42+
# Download binaries
43+
# https://github.com/marketplace/actions/download-a-build-artifact
44+
- name: 📥 Download
45+
uses: actions/download-artifact@v4
46+
with:
47+
name: offline-map-tile-downloader-artifact
48+
- name: 🌡️ Test
49+
run: chmod +x offline-map-tile-downloader-linux-x86_64 && ./offline-map-tile-downloader-linux-x86_64 --help
50+
51+
test-macos:
52+
name: Test macOS
53+
needs: build
54+
runs-on: macos-latest
55+
steps:
56+
- name: 📥 Download
57+
uses: actions/download-artifact@v4
58+
with:
59+
name: offline-map-tile-downloader-artifact
60+
- name: 🌡️ Test
61+
run: chmod +x offline-map-tile-downloader-macos-x86_64 && ./offline-map-tile-downloader-macos-x86_64 --help
62+
63+
test-windows:
64+
name: Test Windows
65+
needs: build
66+
runs-on: windows-latest
67+
steps:
68+
- name: 📥 Download
69+
uses: actions/download-artifact@v4
70+
with:
71+
name: offline-map-tile-downloader-artifact
72+
- name: 🌡️ Test
73+
run: .\offline-map-tile-downloader-windows-x86_64.exe --help
74+
75+
release:
76+
name: Release
77+
needs: [test-linux, test-macos, test-windows]
78+
runs-on: ubuntu-latest
79+
steps:
80+
# Download all artifacts to the current working directory
81+
- name: 📥 Download gcosts
82+
uses: actions/download-artifact@v4
83+
with:
84+
name: offline-map-tile-downloader-artifact
85+
# Release, upload files
86+
# https://github.com/softprops/action-gh-release
87+
- name: ✨ Release
88+
uses: softprops/[email protected]
89+
with:
90+
files: |
91+
offline-map-tile-downloader-linux-x86_64
92+
offline-map-tile-downloader-linux-arm64
93+
offline-map-tile-downloader-macos-x86_64
94+
offline-map-tile-downloader-macos-arm64
95+
offline-map-tile-downloader-windows-x86_64.exe
96+
offline-map-tile-downloader-windows-arm64.exe

0 commit comments

Comments
 (0)