-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (58 loc) · 1.72 KB
/
Copy pathrelease.yml
File metadata and controls
61 lines (58 loc) · 1.72 KB
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: release
on:
release:
types: [created]
workflow_dispatch:
inputs:
tag:
description: Release tag to build and upload artifacts for
required: true
type: string
permissions:
contents: write
jobs:
release:
name: release ${{ matrix.artifact }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
artifact: dp-linux-amd64
- os: ubuntu-24.04-arm
artifact: dp-linux-arm64
- os: macos-15-intel
artifact: dp-macos-amd64
- os: macos-14
artifact: dp-macos-arm64
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.event.release.tag_name }}
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: "2.2.4"
- name: Cache Nim
uses: actions/cache@v4
with:
path: |
~/.nimble
~/.cache/nim
key: ${{ runner.os }}-${{ runner.arch }}-nim-${{ hashFiles('devpilot.nimble') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-nim-
- name: Install dependencies
run: make tidy
- name: Build release binary
run: make build
- name: Package
run: tar -czf "${{ matrix.artifact }}.tar.gz" dp
- name: Upload artifact
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.event.release.tag_name }}
files: ${{ matrix.artifact }}.tar.gz
fail_on_unmatched_files: true
overwrite_files: true