Skip to content

Commit

Permalink
ci: add new release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Mikko Murto <[email protected]>
  • Loading branch information
mmurto committed Apr 14, 2022
1 parent b6c94dc commit e986f14
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 54 deletions.
59 changes: 13 additions & 46 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
8 changes: 0 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e986f14

Please sign in to comment.