-
Notifications
You must be signed in to change notification settings - Fork 1
99 lines (81 loc) · 2.39 KB
/
release-libs.yaml
File metadata and controls
99 lines (81 loc) · 2.39 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Release Shared Libraries
on:
workflow_dispatch:
branches: [main, release]
inputs:
version:
description: Version to release (e.g., 0.1.0)
required: true
type: string
jobs:
check-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check if tag already exists
run: make check-tag
- name: Verify version matches Meta file
run: make check-version
build-linux:
needs: check-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Linux x64 shared library
run: make release-lib VERSION=${{ inputs.version }}
- name: Upload Linux artifact
uses: actions/upload-artifact@v4
with:
name: libyamlstar-linux-x64
path: dist/libyamlstar-${{ inputs.version }}-linux-x64.tar.xz
build-macos:
needs: check-version
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build macOS ARM64 shared library
run: make release-lib VERSION=${{ inputs.version }}
- name: Upload macOS artifact
uses: actions/upload-artifact@v4
with:
name: libyamlstar-macos-arm64
path: dist/libyamlstar-${{ inputs.version }}-macos-arm64.tar.xz
build-windows:
needs: check-version
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install zip
run: choco install zip -y
- name: Build Windows x64 shared library
run: make release-lib VERSION=${{ inputs.version }}
shell: bash
- name: Upload Windows artifact
uses: actions/upload-artifact@v4
with:
name: libyamlstar-windows-x64
path: dist/libyamlstar-${{ inputs.version }}-windows-x64.zip
create-release:
needs: [build-linux, build-macos, build-windows]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist-artifacts
- name: Prepare dist directory
run: |
mkdir -p dist
find dist-artifacts -type f \
\( -name "*.tar.xz" -o -name "*.zip" \) \
-exec mv {} dist/ \;
ls -la dist/
- name: Create GitHub Release
run: make release-github VERSION=${{ inputs.version }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}