ci: add release workflow
This commit is contained in:
parent
c9f86c31f9
commit
9b7bd4c40c
4 changed files with 36 additions and 3 deletions
29
.gitea/workflows/release.yaml
Normal file
29
.gitea/workflows/release.yaml
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
name: Release
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*/v*.*.*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Release:
|
||||||
|
runs-on: cimaster-latest
|
||||||
|
steps:
|
||||||
|
- name: 📦 Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Get variables
|
||||||
|
run: |
|
||||||
|
echo "CRATE=$(echo '${{ github.ref_name }}' | awk 'BEGIN{RS="/"} NR==1{print}')" >> $GITHUB_ENV
|
||||||
|
echo "CRATE_VERSION=$(echo '${{ github.ref_name }}' | awk 'BEGIN{RS="/"} NR==2{print}')" >> $GITHUB_ENV
|
||||||
|
echo "CHANGELOG=$(git show -s --format=%N "${{ github.ref_name }}" | tail -n +4)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: 📤 Publish crate
|
||||||
|
run: |
|
||||||
|
printf '[registries.thetadev]\nindex = "https://code.thetadev.de/ThetaDev/_cargo-index.git"\ntoken = "Bearer ${{ secrets.GITHUB_TOKEN }}"\n' >> ~/.cargo/config.toml
|
||||||
|
cargo publish --registry thetadev --package "${{ env.CRATE }}"
|
||||||
|
|
||||||
|
- name: 🎉 Publish release
|
||||||
|
uses: https://gitea.com/actions/release-action@main
|
||||||
|
with:
|
||||||
|
title: "${{ env.CRATE }} ${{ env.CRATE_VERSION }}"
|
||||||
|
body: "${{ env.CHANGELOG }}"
|
||||||
|
|
@ -62,6 +62,10 @@ tokio-test = "0.4.2"
|
||||||
insta = { version = "1.17.1", features = ["ron", "redactions"] }
|
insta = { version = "1.17.1", features = ["ron", "redactions"] }
|
||||||
path_macro = "1.0.0"
|
path_macro = "1.0.0"
|
||||||
|
|
||||||
|
# Included crates
|
||||||
|
rustypipe = { path = ".", default-features = false }
|
||||||
|
rustypipe-downloader = { path = "./downloader", default-features = false }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["default-tls"]
|
default = ["default-tls"]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,8 @@ rustls-tls-native-roots = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rustypipe = { path = "../", default-features = false }
|
rustypipe.workspace = true
|
||||||
rustypipe-downloader = { path = "../downloader", default-features = false }
|
rustypipe-downloader.workspace = true
|
||||||
reqwest.workspace = true
|
reqwest.workspace = true
|
||||||
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
|
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ rustls-tls-native-roots = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rustypipe = { path = "../", default-features = false }
|
rustypipe.workspace = true
|
||||||
once_cell.workspace = true
|
once_cell.workspace = true
|
||||||
regex.workspace = true
|
regex.workspace = true
|
||||||
thiserror.workspace = true
|
thiserror.workspace = true
|
||||||
|
|
|
||||||
Reference in a new issue