Skip to content

Commit dad8f8c

Browse files
ci: add nightly releases
Signed-off-by: Vytautas Astrauskas <vytautas.astrauskas@sensmetry.com>
1 parent 481cdfd commit dad8f8c

2 files changed

Lines changed: 106 additions & 43 deletions

File tree

.github/workflows/python.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -257,29 +257,29 @@ jobs:
257257
name: wheels-sdist
258258
path: dist
259259

260-
release:
261-
name: Release
262-
runs-on: ubuntu-latest
263-
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
264-
needs: [linux, musllinux, windows, macos, sdist]
265-
permissions:
266-
# Use to sign the release artifacts
267-
id-token: write
268-
# Used to upload release artifacts
269-
contents: write
270-
# Used to generate artifact attestation
271-
attestations: write
272-
steps:
273-
- uses: actions/download-artifact@v4
274-
- name: Generate artifact attestation
275-
uses: actions/attest-build-provenance@v2
276-
with:
277-
subject-path: 'wheels-*/*'
278-
- name: Publish to PyPI
279-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
280-
uses: PyO3/maturin-action@v1
281-
env:
282-
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
283-
with:
284-
command: upload
285-
args: --non-interactive --skip-existing wheels-*/*
260+
# release:
261+
# name: Release
262+
# runs-on: ubuntu-latest
263+
# if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
264+
# needs: [linux, musllinux, windows, macos, sdist]
265+
# permissions:
266+
# # Use to sign the release artifacts
267+
# id-token: write
268+
# # Used to upload release artifacts
269+
# contents: write
270+
# # Used to generate artifact attestation
271+
# attestations: write
272+
# steps:
273+
# - uses: actions/download-artifact@v4
274+
# - name: Generate artifact attestation
275+
# uses: actions/attest-build-provenance@v2
276+
# with:
277+
# subject-path: 'wheels-*/*'
278+
# - name: Publish to PyPI
279+
# if: ${{ startsWith(github.ref, 'refs/tags/') }}
280+
# uses: PyO3/maturin-action@v1
281+
# env:
282+
# MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
283+
# with:
284+
# command: upload
285+
# args: --non-interactive --skip-existing wheels-*/*

.github/workflows/test.yml

Lines changed: 80 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,44 @@ env:
1414
RUST_BACKTRACE: 1
1515

1616
jobs:
17-
test:
17+
# test:
18+
# strategy:
19+
# matrix:
20+
# # macos-13 is x86, macos-latest is arm64
21+
# os: [ubuntu-22.04, windows-latest, macos-13, macos-latest]
22+
# fail-fast: false
23+
# runs-on: ${{ matrix.os }}
24+
# steps:
25+
# - uses: actions/checkout@v4
26+
# - name: Cache
27+
# uses: actions/cache@v4
28+
# with:
29+
# path: |
30+
# ~/.cargo/registry
31+
# ~/.cargo/git
32+
# target
33+
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
34+
# - uses: taiki-e/install-action@cargo-hack
35+
# - name: Clippy
36+
# run: cargo hack clippy --each-feature --no-dev-deps --features std --ignore-unknown-features -- --deny warnings
37+
# - name: Format
38+
# run: cargo fmt --check
39+
# - name: Set up git user
40+
# run: |
41+
# git config --global user.email "user@sysand.org"
42+
# git config --global user.name "Test User"
43+
# - name: Test Core
44+
# run: cargo test --package sysand-core --verbose --features filesystem,js,python,alltests
45+
# - name: Test CLI
46+
# run: cargo test --package sysand --verbose --features alltests
1847

48+
build:
1949
strategy:
2050
matrix:
2151
# macos-13 is x86, macos-latest is arm64
2252
os: [ubuntu-22.04, windows-latest, macos-13, macos-latest]
23-
fail-fast: false
24-
2553
runs-on: ${{ matrix.os }}
26-
54+
# needs: [test]
2755
steps:
2856
- uses: actions/checkout@v4
2957
- name: Cache
@@ -34,16 +62,51 @@ jobs:
3462
~/.cargo/git
3563
target
3664
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
37-
- uses: taiki-e/install-action@cargo-hack
38-
- name: Clippy
39-
run: cargo hack clippy --each-feature --no-dev-deps --features std --ignore-unknown-features -- --deny warnings
40-
- name: Format
41-
run: cargo fmt --check
42-
- name: Set up git user
43-
run: |
44-
git config --global user.email "user@sysand.org"
45-
git config --global user.name "Test User"
46-
- name: Test Core
47-
run: cargo test --package sysand-core --verbose --features filesystem,js,python,alltests
48-
- name: Test CLI
49-
run: cargo test --package sysand --verbose --features alltests
65+
- name: Build
66+
run: cargo build --bin sysand --release
67+
- name: Create the distribution directory
68+
run: mkdir -p dist
69+
- name: Copy binaries
70+
if: matrix.os == 'windows-latest'
71+
run: cp target/release/sysand.exe dist/sysand-${{ matrix.os }}.exe
72+
- name: Copy binaries
73+
if: matrix.os != 'windows-latest'
74+
run: cp target/release/sysand dist/sysand-${{ matrix.os }}
75+
- name: Upload binaries
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: sysand-cli-${{ matrix.platform.os }}
79+
path: dist/*
80+
81+
release:
82+
name: Release
83+
runs-on: ubuntu-latest
84+
needs: [test, build]
85+
permissions:
86+
# Use to sign the release artifacts
87+
id-token: write
88+
# Used to upload release artifacts
89+
contents: write
90+
# Used to generate artifact attestation
91+
attestations: write
92+
steps:
93+
- uses: actions/download-artifact@v4
94+
- name: Generate artifact attestation
95+
uses: actions/attest-build-provenance@v2
96+
with:
97+
subject-path: 'dist/*'
98+
- name: List files
99+
shell: bash
100+
run: ls -dla dist/*
101+
- name: Create release tag
102+
shell: bash
103+
run: echo "TAG_NAME=$(date +v-%Y-%m-%d-%H%M)" >> $GITHUB_ENV
104+
- name: Create a nightly release
105+
uses: softprops/action-gh-release@v2
106+
with:
107+
prerelease: true
108+
files: |
109+
dist/*
110+
overwrite_files: false
111+
tag_name: ${{ env.TAG_NAME }}
112+
name: Nightly Release ${{ env.TAG_NAME }}

0 commit comments

Comments
 (0)