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

38 lines
915 B
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 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