Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package release: 2.0.0-alpha.1 #153

Merged
merged 2 commits into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/publish_crate.yml
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 }}
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
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"

Expand Down