Repository navigation
124 lines (111 loc) · 3.64 KB
/
Copy pathci.yml
File metadata and controls
124 lines (111 loc) · 3.64 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# If this file is renamed, the incrementing run attempt number will be reset.
name: CI
on:
push:
branches: [ "dev", "main" ]
pull_request:
branches: [ "dev", "main" ]
workflow_dispatch:
inputs:
publish:
description: 'Publish a GitHub release'
type: boolean
required: true
default: true
env:
CI_BUILD_NUMBER_BASE: ${{ github.run_number }}
CI_TARGET_BRANCH: ${{ github.head_ref || github.ref_name }}
CI_PUBLISH: ${{ (github.event_name == 'push' && github.ref_name == 'main') || inputs.publish }}
jobs:
build-windows:
name: Build (Windows)
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Setup
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Build and Publish
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
run: |
./build/Build.Windows.ps1
- name: Upload archives
# Consumed by the publish-npm job
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v7
with:
name: archives
path: |
artifacts/seqcli-*-*.zip
artifacts/seqcli-*-*.tar.gz
if-no-files-found: error
retention-days: 1
build-linux:
name: Build (Linux)
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Setup
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Configure Docker
run: |
docker run --privileged --rm linuxkit/binfmt:bebbae0c1100ebf7bf2ad4dfb9dfd719cf0ef132
sudo service docker restart
- name: Build and Publish
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
SEQ_DOCKER_TAG: 2026.1
shell: pwsh
run: |
./build/Build.Linux.ps1 -SeqDockerTag $env:SEQ_DOCKER_TAG
publish-npm:
name: Publish (npm)
runs-on: ubuntu-24.04
needs: build-windows
# Mirrors NuGet publishing: builds from any branch this workflow targets (dev builds as
# prereleases under the `dev` dist-tag, main builds as `latest`), but never pull requests.
if: github.event_name != 'pull_request'
permissions:
contents: read
# Required for npm trusted publishing (OIDC) and provenance
id-token: write
steps:
- uses: actions/checkout@v6
- name: Setup
uses: actions/setup-node@v7
with:
node-version: 24.x
# Bootstrap only: together with NODE_AUTH_TOKEN below, authenticates using the NPM_TOKEN
# secret. Once trusted publishing is configured for every @datalust/seqcli* package
# (bound to this workflow file, ci.yml), remove `registry-url` here and `NODE_AUTH_TOKEN`
# below so that npm authenticates with the OIDC token instead.
registry-url: https://registry.npmjs.org/
- name: Update npm
# Trusted publishing and automatic provenance require npm 11.5.1 or later
run: |
npm install -g npm@latest
npm --version
- name: Download archives
uses: actions/download-artifact@v8
with:
name: archives
path: npm-archives
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
shell: pwsh
run: |
./build/Build.Npm.ps1 -ArchiveDir ./npm-archives