-
-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (55 loc) · 2.31 KB
/
native-builds.yml
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: Build and Upload native binaries
on:
workflow_dispatch:
push:
branches:
- main
env:
REGISTRY: ghcr.io
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
builder:
strategy:
fail-fast: true
matrix:
os: ['ubuntu-latest', 'macos-13', 'macos-15']
runs-on: ${{ matrix.os }}
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
- uses: swift-actions/setup-swift@v2
- uses: oras-project/setup-oras@v1
- run: oras version
- name: Build
run: |
bash thirdparty/sourcekitten/build.sh
ls -l thirdparty/sourcekitten/SourceKitten/.build/release
echo $GITHUB_TOKEN | oras login ghcr.io -u $GITHUB_USERNAME --password-stdin
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload linux amd64
run: |
oras push ghcr.io/cyclonedx/cdxgen-plugins-bin:linux-amd64 \
--artifact-type application/vnd.oras.config.v1+json \
./thirdparty/sourcekitten/SourceKitten/.build/release/sourcekitten:application/vnd.cyclonedx.plugins.layer.v1+tar \
./thirdparty/sourcekitten/SourceKitten/.build/release/sourcekitten.sha256:application/vnd.cyclonedx.plugins.layer.v1+tar
if: matrix.os == 'macos-13'
- name: Upload darwin amd64
run: |
oras push ghcr.io/cyclonedx/cdxgen-plugins-bin:darwin-amd64 \
--artifact-type application/vnd.oras.config.v1+json \
./thirdparty/sourcekitten/SourceKitten/.build/release/sourcekitten:application/vnd.cyclonedx.plugins.layer.v1+tar \
./thirdparty/sourcekitten/SourceKitten/.build/release/sourcekitten.sha256:application/vnd.cyclonedx.plugins.layer.v1+tar
if: matrix.os == 'macos-13'
- name: Upload darwin arm64
run: |
oras push ghcr.io/cyclonedx/cdxgen-plugins-bin:darwin-arm64 \
--artifact-type application/vnd.oras.config.v1+json \
./thirdparty/sourcekitten/SourceKitten/.build/release/sourcekitten:application/vnd.cyclonedx.plugins.layer.v1+tar \
./thirdparty/sourcekitten/SourceKitten/.build/release/sourcekitten.sha256:application/vnd.cyclonedx.plugins.layer.v1+tar
if: matrix.os == 'macos-15'