Skip to content

Commit

Permalink
onlyu release to cargo once
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlabouve committed Jul 4, 2024
1 parent 09c2078 commit bb45e1c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ jobs:
target: ${{ matrix.target }}
override: true

- name: Publish to Cargo
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
env:
CARGO_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

- name: Build
run: cargo build --release --target ${{ matrix.target }}

Expand Down Expand Up @@ -65,5 +60,4 @@ jobs:
target/${{ matrix.target }}/release/minos-codex-${{ matrix.os }}.tar.gz
target/${{ matrix.target }}/release/minos-codex-${{ matrix.os }}.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/release_to_cargo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
publish_to_cargo:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Publish to Cargo
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
env:
CARGO_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 comments on commit bb45e1c

Please sign in to comment.