-
Notifications
You must be signed in to change notification settings - Fork 3
32 lines (25 loc) · 814 Bytes
/
Copy pathmain.yml
File metadata and controls
32 lines (25 loc) · 814 Bytes
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
name: Main
on: push
jobs:
test_publish:
name: Test and publish
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Install dependencies
run: make setup
- name: Run tests
run: make test
- name: Build
run: make build
- name: Publish (dry run)
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} # Only dry-run if not a release.
run: |
cargo publish --dry-run -p sectxtlib
#cargo publish --dry-run -p sectxt # Fails if sectxtlib is not actually published
- name: Publish
if: startsWith(github.ref, 'refs/tags/v') # Only publish for new release.
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: make publish