Skip to content

Commit d4c8f03

Browse files
committed
exp
1 parent 699f816 commit d4c8f03

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
tag:
6+
description: 'Release Tag'
7+
required: true
8+
9+
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
hashes: ${{ steps.hash.outputs.hashes }}
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
# token: ${{ secrets.ACTIONS_ACCESS_TOKEN }}
20+
ref: ${{ inputs.tag }}
21+
- name: Install the latest version of rye
22+
uses: eifinger/setup-rye@v2
23+
with:
24+
version: ${{ vars.RYE_VERSION }}
25+
enable-cache: true
26+
- name: Rye Setup
27+
run: |
28+
rye config --set-bool behavior.use-uv=true
29+
- name: Create build
30+
working-directory: libs/labelbox
31+
run: |
32+
rye sync
33+
rye build
34+
- name: "Generate hashes"
35+
id: hash
36+
run: |
37+
cd dist && echo "hashes=$(sha256sum * | base64 -w0)" >> $GITHUB_OUTPUT
38+
- uses: actions/upload-artifact@v4
39+
with:
40+
name: build
41+
path: ./dist
42+
43+
44+
publish-python-package-to-release:
45+
runs-on: ubuntu-latest
46+
needs: ['build']
47+
permissions:
48+
contents: write
49+
steps:
50+
- uses: actions/download-artifact@v4
51+
with:
52+
name: build
53+
path: ./artifact
54+
- name: List artifact contents
55+
run: ls -R ./artifact
56+
- name: Upload dist to release
57+
run: |
58+
gh release upload ${{ inputs.tag }} ./artifact/*
59+
env:
60+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)