Skip to content

Commit 377cb6e

Browse files
committed
Add publish crate job
1 parent 4f3f215 commit 377cb6e

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/build-and-test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,21 @@ jobs:
3434
retention-days: 7
3535
if-no-files-found: error
3636

37+
publish:
38+
name: Publish release
39+
needs:
40+
- build_and_test
41+
runs-on: ubuntu-latest
42+
container:
43+
image: ghcr.io/${{ github.repository_owner }}/lukaj-test:latest
44+
credentials:
45+
username: ${{ github.actor }}
46+
password: ${{ secrets.github_token }}
47+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
48+
steps:
49+
- uses: actions/checkout@v3
50+
- run: rustup update stable && rustup default stable
51+
- name: Push to crates.io
52+
run: cargo publish --all-features
53+
env:
54+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)