Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to bump versions and create releases #3674

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Bump packages

permissions:
contents: write

on:
workflow_dispatch:
inputs:
action:
description: 'bump or publish'
required: true
default: 'bump'
type: choice
options:
- bump
- publish

jobs:
bump:
runs-on: ubuntu-latest
if: github.event.inputs.action == 'bump'
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: rustc publish.rs
- run: git checkout -b bump
- run: printf "bump versions for release\n\n" > /tmp/bump
- run: ./publish bump >> /tmp/bump
- run: git add .
- run: git commit -m "bump"
- run: git push origin bump
- run: gh pr create --fill --body-file /tmp/bump
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish:
runs-on: ubuntu-latest
if: github.event.inputs.action == 'publish'
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: rustc publish.rs
- name: assert we're on bump branch
run: test "$(git git branch --show-current)" = "bump"
- run: ./publish publish
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
Loading