particle-os-cli/.github/workflows/release.yml
Hikari (ひかり) 6e0d1ac5b8
chore: fix simple error in workflow (#27)
cargo exits with a 1 code which makes github actions bork out
2024-01-28 08:33:07 -05:00

57 lines
1.4 KiB
YAML

name: Release
on:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
release:
if: github.repository == 'blue-build/cli'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
packages: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v4
with:
path: |
target/
~/.cargo/bin/
~/.cargo/git/db/
~/.cargo/registry/index/
~/.cargo/registry/cache/
key: ${{ runner.os }}-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
- name: Install just
run: sudo snap install --edge --classic just
# Cargo returns an exit code of 1 if already installed
- name: Install cargo-release
continue-on-error: true
run: cargo install cargo-release --force
- name: Git setup
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Setup release
run: just cargo-release --execute
- name: Create PR
uses: peter-evans/create-pull-request@v5
with:
delete-branch: true
base: "main"
title: "Preparing Next Release"
body: |
Preparing next release
This PR has been auto-generated