From e986f14074695418e2db9ef4cb11a843a764443a Mon Sep 17 00:00:00 2001 From: Mikko Murto Date: Thu, 14 Apr 2022 10:09:54 +0300 Subject: [PATCH] ci: add new release workflow Signed-off-by: Mikko Murto --- .github/workflows/release.yml | 59 ++++++++--------------------------- CHANGELOG.md | 8 ----- 2 files changed, 13 insertions(+), 54 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f57a3d..16ade45 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,62 +6,29 @@ name: Release on: push: - tags: - - 'v*' + branches: + - main jobs: - Test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - name: Checkout - - uses: Swatinem/rust-cache@v1 - - uses: actions-rs/cargo@v1 - name: Cargo build - if: always() - id: build - with: - command: test - args: --no-run - - uses: actions-rs/cargo@v1 - name: Cargo test - if: always() - id: test - with: - command: test - args: -- --include-ignored - - uses: actions-rs/cargo@v1 - name: Cargo clippy - if: always() - id: clippy - with: - command: clippy - args: -- -D warnings - - uses: actions-rs/cargo@v1 - name: Cargo fmt - if: always() - id: format - with: - command: fmt - args: --all -- --check - - Reuse: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: REUSE Compliance Check - uses: fsfe/reuse-action@v1 - Release: - needs: ["Test", "Reuse"] runs-on: ubuntu-latest steps: + - uses: google-github-actions/release-please-action@v3 + id: release + with: + release-type: rust + package-name: spdx-rs + bump-minor-pre-major: true + bump-patch-for-minor-pre-major: true + pull-request-title-pattern: "chore: release ${version}" - uses: actions/checkout@v2 + if: ${{ steps.release.outputs.release_created }} - uses: actions-rs/toolchain@v1 + if: ${{ steps.release.outputs.release_created }} with: toolchain: stable override: true - uses: katyo/publish-crates@v1 + if: ${{ steps.release.outputs.release_created }} with: registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9030a24..2dc92b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,13 +6,6 @@ SPDX-License-Identifier: MIT # Changelog -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [Unreleased] - ## [0.5.0] - 2022-04-13 ### Changed @@ -58,7 +51,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Started following semantic versioning and keeping a changelog. -[unreleased]: https://github.com/doubleopen-project/spdx-rs/compare/v0.5.0...HEAD [0.5.0]: https://github.com/doubleopen-project/spdx-rs/compare/v0.4.1...v0.5.0 [0.4.1]: https://github.com/doubleopen-project/spdx-rs/compare/v0.4.0...v0.4.1 [0.4.0]: https://github.com/doubleopen-project/spdx-rs/compare/v0.3.0...v0.4.0