-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #153: Package release:
2.0.0-alpha.1
75ec0a6 feat: release 2.0.0-alpha.1 (Jose Celano) 260452f ci: [#152] add workflow to publish on crates.io (Jose Celano) Pull request description: Prepare new release: `2.0.0-alpha.1` - [x] Add workflow to publish package on crates.io - [x] Update `Cargo.toml` with mandatory attributes and change version ACKs for top commit: josecelano: ACK 75ec0a6 Tree-SHA512: 1202387282bc1274ade148dbf212404dff0345ae7af894c02bda0ba8392e8d7fc61e26dd8c6d46307d871a8b5eaa658e14e98bcbfb0141c951292b3880dca1d0
- Loading branch information
Showing
3 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Publish crate | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
check-secret: | ||
runs-on: ubuntu-latest | ||
environment: crates-io-torrust | ||
outputs: | ||
publish: ${{ steps.check.outputs.publish }} | ||
steps: | ||
- id: check | ||
env: | ||
CRATES_TOKEN: "${{ secrets.CRATES_TOKEN }}" | ||
if: "${{ env.CRATES_TOKEN != '' }}" | ||
run: echo "publish=true" >> $GITHUB_OUTPUT | ||
|
||
test: | ||
needs: check-secret | ||
if: needs.check-secret.outputs.publish == 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
components: llvm-tools-preview | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run Tests | ||
run: cargo test | ||
|
||
publish: | ||
needs: test | ||
if: needs.check-secret.outputs.publish == 'true' | ||
runs-on: ubuntu-latest | ||
environment: crates-io-torrust | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
|
||
- name: Publish workspace packages | ||
run: | | ||
cargo publish -p torrust-tracker-located-error | ||
cargo publish -p torrust-tracker-primitives | ||
cargo publish -p torrust-tracker-configuration | ||
cargo publish -p torrust-tracker-test-helpers | ||
cargo publish -p torrust-tracker | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
[package] | ||
name = "torrust-index-backend" | ||
version = "2.0.0-dev.1" | ||
description = "The backend (API) for the Torrust Index project." | ||
license-file = "COPYRIGHT" | ||
version = "2.0.0-alpha.1" | ||
authors = ["Mick van Dijke <[email protected]>", "Wesley Bijleveld <[email protected]>"] | ||
repository = "https://github.com/torrust/torrust-index-backend" | ||
edition = "2021" | ||
default-run = "main" | ||
|
||
|