This repository has been archived by the owner on Mar 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (73 loc) · 1.98 KB
/
ci.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CI
on:
push:
permissions:
contents: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Task
uses: arduino/setup-task@v1
with:
repo-token: ${{ github.token }}
- name: Install GNU Softwares
uses: liblaf/template/.github/actions/install@main
with:
brew: coreutils gnu-tar make wget
choco: gnuwin32-coreutils.install make wget
- name: Build
run: task dist
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-${{ runner.arch }}
path: dist/*
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
release:
name: Release
needs:
- build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- id: version
name: Read Version
run: echo "version=$(cat version.txt)" >> "$GITHUB_OUTPUT"
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Delete Existing Release
run: gh release --repo="${{ github.repository }}" delete "v${{ steps.version.outputs.version }}" --cleanup-tag
env:
GH_TOKEN: ${{ github.token }}
continue-on-error: true
- name: Create GitHub Release
run: gh release --repo="${{ github.repository }}" create "v${{ steps.version.outputs.version }}" artifacts/**/* --generate-notes
env:
GH_TOKEN: ${{ github.token }}
check:
name: Check
needs:
- build
if: always()
runs-on: ubuntu-latest
steps:
- name: Check
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}