Skip to content

Commit 8f5b822

Browse files
committed
chore(action): release on tag v*
1 parent e5ba669 commit 8f5b822

File tree

2 files changed

+58
-26
lines changed

2 files changed

+58
-26
lines changed

.github/workflows/python-release.yml

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- "py-v*"
7+
- "v*"
78

89
permissions:
910
contents: read
@@ -143,29 +144,29 @@ jobs:
143144
name: wheels-sdist
144145
path: dist
145146

146-
# release:
147-
# name: Release
148-
# runs-on: ubuntu-latest
149-
# if: ${{ startsWith(github.ref, 'refs/tags/') }}
150-
# needs: [linux, musllinux, windows, macos, sdist]
151-
# permissions:
152-
# # Use to sign the release artifacts
153-
# id-token: write
154-
# # Used to upload release artifacts
155-
# contents: write
156-
# # Used to generate artifact attestation
157-
# attestations: write
158-
# steps:
159-
# - uses: actions/download-artifact@v4
160-
# - name: Generate artifact attestation
161-
# uses: actions/attest-build-provenance@v1
162-
# with:
163-
# subject-path: "wheels-*/*"
164-
# - name: Publish to PyPI
165-
# if: ${{ startsWith(github.ref, 'refs/tags/') }}
166-
# uses: PyO3/maturin-action@v1
167-
# env:
168-
# MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
169-
# with:
170-
# command: upload
171-
# args: --non-interactive --skip-existing wheels-*/*
147+
release:
148+
name: Release
149+
runs-on: ubuntu-latest
150+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
151+
needs: [linux, musllinux, windows, macos, sdist]
152+
permissions:
153+
# Use to sign the release artifacts
154+
id-token: write
155+
# Used to upload release artifacts
156+
contents: write
157+
# Used to generate artifact attestation
158+
attestations: write
159+
steps:
160+
- uses: actions/download-artifact@v4
161+
- name: Generate artifact attestation
162+
uses: actions/attest-build-provenance@v1
163+
with:
164+
subject-path: "wheels-*/*"
165+
- name: Publish to PyPI
166+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
167+
uses: PyO3/maturin-action@v1
168+
env:
169+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
170+
with:
171+
command: upload
172+
args: --non-interactive --skip-existing wheels-*/*

.github/workflows/rust-release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Rust Release
2+
3+
env:
4+
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
5+
6+
on:
7+
push:
8+
tags:
9+
- rs-v*
10+
- v*
11+
12+
jobs:
13+
rust_publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
19+
- name: Install Rust
20+
uses: actions-rs/toolchain@v1
21+
with:
22+
toolchain: stable
23+
24+
- name: Dry Run Publish package rust
25+
working-directory: ./bintensors
26+
run: cargo publish --dry-run
27+
28+
- name: Publish package rust
29+
if: ${{ !contains(github.ref, 'rc') }}
30+
working-directory: ./bintensors
31+
run: cargo publish --token ${CRATES_TOKEN}

0 commit comments

Comments
 (0)