Skip to content

Commit

Permalink
Add publish-crate step to release workflow (#85)
Browse files Browse the repository at this point in the history
Addresses #77.

This new step requires the presence of a GitHub Actions Secret named CRATES_IO_API_TOKEN with access to publish the ripsecrets crate.

Dependencies were updated to avoid versions that have been yanked.
  • Loading branch information
lafrenierejm committed Feb 24, 2024
1 parent 07e705b commit ef54b36
Show file tree
Hide file tree
Showing 4 changed files with 207 additions and 268 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- uses: actions/checkout@v3

- name: Install and configure Nix
uses: cachix/install-nix-action@v18
uses: cachix/install-nix-action@v25

- name: Build the OCI tar.gz
run: nix build .#ripsecrets-oci
Expand Down Expand Up @@ -98,3 +98,17 @@ jobs:
- name: Docker push
run: |
docker push ${{ github.repository }}:${{ needs.determine-tag.outputs.version }}
publish-crate:
name: Publish to crates.io
runs-on: ubuntu-latest

steps:
- name: Install and configure Nix
uses: cachix/install-nix-action@v25

- name: Publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }}
run:
nix develop --command cargo publish

0 comments on commit ef54b36

Please sign in to comment.