0
0
mirror of https://github.com/TeFiLeDo/tree-owners.git synced 2024-11-25 05:36:15 +01:00
tree-owners/.github/workflows/release.yml

43 lines
1.1 KiB
YAML
Raw Normal View History

2023-09-24 07:00:08 +02:00
name: Release
on:
push:
tags:
- "v*"
2023-09-24 07:38:07 +02:00
env:
CARGO_TERM_COLOR: always
2023-09-24 07:00:08 +02:00
jobs:
release:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
2023-09-24 07:38:07 +02:00
- 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
2023-09-24 07:00:08 +02:00
- name: Build
run: cargo build --release --verbose
- name: Run tests
run: cargo test --release --verbose
2023-09-24 14:58:17 +02:00
- name: Adjust compiler output
2023-09-24 15:01:04 +02:00
run: mv ../ci-out/_tree-owners ../ci-out/tree-owners.zsh
2023-09-24 07:38:07 +02:00
- 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"
2023-09-24 07:00:08 +02:00
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
LICENSE
target/release/tree-owners
2023-09-24 14:58:17 +02:00
../ci-out/tree-owners.bash
../ci-out/tree-owners.fish
../ci-out/tree-owners.zsh