mirror of
https://github.com/TeFiLeDo/tree-owners.git
synced 2024-11-14 16:46:15 +01:00
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: "ubuntu-latest"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Check versions
|
|
run: |
|
|
CARGO_VER=$(cargo pkgid | sed "s/^.*#/v/")
|
|
TAG_VER=${{ github.ref_name }}
|
|
if [[ "$CARGO_VER" != "$TAG_VER" ]]; then exit 1; fi
|
|
- name: Build
|
|
run: cargo build --release --verbose
|
|
- name: Run tests
|
|
run: cargo test --release --verbose
|
|
- name: Adjust compiler output
|
|
run: mv ../ci-out/_tree-owners ../ci-out/tree-owners.zsh
|
|
- name: Publish to crates.io
|
|
run: cargo publish
|
|
env:
|
|
CARGO_REGISTRY_TOKEN: "${{ secrets.CRATES_IO_TOKEN }}"
|
|
- name: Publish to GitHub
|
|
uses: "marvinpinto/action-automatic-releases@latest"
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
prerelease: false
|
|
files: |
|
|
LICENSE
|
|
target/release/tree-owners
|
|
../ci-out/tree-owners.bash
|
|
../ci-out/tree-owners.fish
|
|
../ci-out/tree-owners.zsh
|