mirror of
https://github.com/eigenein/wotbreplay-parser.git
synced 2026-10-21 18:37:00 +02:00
52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
name: Publish
|
|
|
|
on:
|
|
release:
|
|
types: ["published"]
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout the repository
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set the versions
|
|
run: |
|
|
sed -i -e 's/version = "0\.0\.0"/version = "${{ github.ref_name }}"/g' Cargo.toml
|
|
- name: Rustup
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
|
|
- name: Build the changelog
|
|
id: changelog
|
|
uses: Bullrich/generate-release-changelog@master
|
|
env:
|
|
REPO: ${{ github.repository }}
|
|
|
|
- name: Update the release
|
|
uses: tubone24/[email protected]
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
release_name: ${{ github.ref_name }}
|
|
body: ${{ steps.changelog.outputs.changelog }}
|
|
|
|
- name: Publish the crates
|
|
run: |
|
|
cargo login
|
|
cargo publish --allow-dirty
|
|
env:
|
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|