File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build Binaries
2+
3+ on :
4+ workflow_dispatch :
5+
6+ permissions :
7+ contents : write
8+
9+ jobs :
10+ build :
11+ name : Build ${{ matrix.target.NAME }}
12+ runs-on : ${{ matrix.target.OS }}
13+
14+ strategy :
15+ fail-fast : false
16+ matrix :
17+ target : # same matrix you already use
18+
19+ steps :
20+ - uses : actions/checkout@v4
21+
22+ - uses : dtolnay/rust-toolchain@stable
23+ with :
24+ targets : ${{ matrix.target.TARGET }}
25+
26+ - name : Install cross (linux)
27+ if : runner.os == 'Linux'
28+ run : cargo install cross --git https://github.com/cross-rs/cross
29+
30+ - name : Build binary
31+ run : |
32+ if [[ "${{ runner.os }}" == "Linux" ]]; then
33+ cross build --release --target ${{ matrix.target.TARGET }}
34+ else
35+ cargo build --release --target ${{ matrix.target.TARGET }}
36+ fi
37+
38+ - name : Upload Binary
39+ uses : actions/upload-artifact@v4
40+ with :
41+ name : binary-${{ matrix.target.NAME }}
42+ path : target/${{ matrix.target.TARGET }}/release/gitcraft*
43+
44+ - name : Build wheel (if enabled)
45+ if : matrix.target.PYPI_PUBLISH == true
46+ run : |
47+ pip install maturin
48+ maturin build --release --target ${{ matrix.target.TARGET }}
49+
50+ - name : Upload Wheels
51+ if : matrix.target.PYPI_PUBLISH == true
52+ uses : actions/upload-artifact@v4
53+ with :
54+ name : wheels-${{ matrix.target.NAME }}
55+ path : target/wheels/*.whl
Original file line number Diff line number Diff line change 1+ name : Publish Cargo
2+
3+ on :
4+ workflow_dispatch :
5+
6+ permissions :
7+ contents : read
8+
9+ jobs :
10+ publish :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - name : Install Rust
16+ uses : dtolnay/rust-toolchain@stable
17+
18+ - run : cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Publish NPM packages
2+
3+ on :
4+ workflow_dispatch :
5+
6+ jobs :
7+ publish :
8+ runs-on : ubuntu-latest
9+
10+ steps :
11+ - uses : actions/checkout@v4
12+
13+ - name : Download binaries
14+ uses : actions/download-artifact@v4
15+ with :
16+ pattern : binary-*
17+ merge-multiple : false
18+
19+ - name : Build platform packages
20+ run : ./scripts/build-platform-npm.sh
21+
22+ - name : Build unified package
23+ run : ./scripts/build-unified-npm.sh
24+
25+ - name : Publish
26+ run : ./scripts/publish-npm.sh
27+ env :
28+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Publish NPM packages
2+
3+ on :
4+ workflow_dispatch :
5+
6+ jobs :
7+ publish :
8+ runs-on : ubuntu-latest
9+
10+ steps :
11+ - uses : actions/checkout@v4
12+
13+ - name : Download binaries
14+ uses : actions/download-artifact@v4
15+ with :
16+ pattern : binary-*
17+ merge-multiple : false
18+
19+ - name : Build platform packages
20+ run : ./scripts/build-platform-npm.sh
21+
22+ - name : Build unified package
23+ run : ./scripts/build-unified-npm.sh
24+
25+ - name : Publish
26+ run : ./scripts/publish-npm.sh
27+ env :
28+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Publish PyPI
2+
3+ on :
4+ workflow_dispatch :
5+
6+ permissions :
7+ id-token : write
8+
9+ jobs :
10+ publish :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Download wheels
15+ uses : actions/download-artifact@v4
16+ with :
17+ pattern : wheels-*
18+ merge-multiple : true
19+ path : dist
20+
21+ - name : Publish
22+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change 1+ name : Release Orchestrator
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*.*.*"
7+ workflow_dispatch :
8+
9+ jobs :
10+ trigger-release :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Fire sub-workflows
14+ uses : benc-uk/workflow-dispatch@v1
15+ with :
16+ workflow : publish-cargo.yml
17+
18+ - name : Trigger Builds
19+ uses : benc-uk/workflow-dispatch@v1
20+ with :
21+ workflow : build-binaries.yml
22+
23+ - name : Trigger PyPI
24+ uses : benc-uk/workflow-dispatch@v1
25+ with :
26+ workflow : publish-pypi.yml
27+
28+ - name : Trigger NPM
29+ uses : benc-uk/workflow-dispatch@v1
30+ with :
31+ workflow : publish-npm.yml
32+
33+ - name : Trigger Homebrew
34+ uses : benc-uk/workflow-dispatch@v1
35+ with :
36+ workflow : publish-homebrew.yml
You can’t perform that action at this time.
0 commit comments