-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (61 loc) · 1.8 KB
/
release-worker.yml
File metadata and controls
74 lines (61 loc) · 1.8 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
name: Release Worker
on:
push:
tags:
- worker-v*
env:
LINUX_TARGET: x86_64-unknown-linux-gnu
jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Ensure tag is on main
run: |
git fetch origin main
git merge-base --is-ancestor "$GITHUB_SHA" origin/main
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Build
run: scripts/build-worker.sh ${{ env.LINUX_TARGET }}
- name: Package the worker
run: |
cd dist
mv fluxqueue-worker-${{ env.LINUX_TARGET }} fluxqueue-worker
tar -czvf fluxqueue-${{ github.ref_name }}-py${{ matrix.python-version }}-linux-x86_64.tar.gz fluxqueue-worker
rm fluxqueue-worker
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: fluxqueue-worker-linux-py${{ matrix.python-version }}
path: dist/*
release:
needs: [linux]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
files: artifacts/**/*
draft: false
prerelease: false