Skip to content

Commit

Permalink
chore(cicd): Separate crate publish to its own job
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfarias committed Mar 20, 2022
1 parent 5495a01 commit c438306
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/release_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish
run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}

image_release:
needs: build
if: ${{ success() }} && github.event_name != 'pull_request'
Expand Down Expand Up @@ -96,3 +91,22 @@ jobs:
--tag tomasfarias/c2g:latest \
--tag tomasfarias/c2g:${{ steps.tagName.outputs.tag }} \
--file ./Dockerfile .
crate_publish:
needs: build
if: ${{ success() }} && github.event_name != 'pull_request'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Publish
run: cargo publish
env:
CARGO_REGISTRY__TOKEN: ${{ secrets.CRATES_TOKEN }}

0 comments on commit c438306

Please sign in to comment.