-
-
Notifications
You must be signed in to change notification settings - Fork 923
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
autorelease workflow #1960
Merged
Merged
autorelease workflow #1960
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
36fe5e3
chore: clean up cargo.tomls to enable releasing
jkelleyrtp 53bfa98
wip: add publish workflow
jkelleyrtp be29c1f
chore: move all packages onto workspace versions
jkelleyrtp 0ae0929
fix: some simple formatting and version numbers
jkelleyrtp fff7097
wip: add semver workflows
jkelleyrtp 98ef7c8
wip: add some workflows for backporting, semver, and publishing
jkelleyrtp 37b8fd0
Merge branch 'main' into jk/05-pre
jkelleyrtp 8f70f89
wip: consolidate release
jkelleyrtp 112b4f9
wip: release yaml
jkelleyrtp 319eb29
wip: clean up workflows
jkelleyrtp 6cc66b5
Add promote workflow
jkelleyrtp 862d2ea
Fix syntax error in main
jkelleyrtp 7692907
combine checks for semver
jkelleyrtp 52f07de
ignore description
jkelleyrtp 52be1d7
semver checks fix
jkelleyrtp 19c0007
semver checks fix
jkelleyrtp 7240811
temp disable semver checks
jkelleyrtp 04cd98f
add backport
jkelleyrtp 34f4647
add name to publish flow
jkelleyrtp c5096ff
add gitignore to tailwind
jkelleyrtp cf8c378
bump manganis
jkelleyrtp 9bb820c
fix syntax for publish
jkelleyrtp 2ead6c6
give longer window for events
jkelleyrtp 48d6a9a
Add logging to event checker
jkelleyrtp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Runs whenever a PR is merged: | ||
# - attempt to backports fixes | ||
# - upload nightly docs | ||
# | ||
# Future: | ||
# - upload nightly CLI builds | ||
# - upload nightly vscode extension | ||
# - upload benchmarks | ||
# - compute coverge | ||
# | ||
# Note that direct commits to master circumvent this workflow! | ||
|
||
name: Backport merged pull request | ||
on: | ||
pull_request_target: | ||
types: [closed] | ||
|
||
permissions: | ||
contents: write # so it can comment | ||
pull-requests: write # so it can create pull requests | ||
|
||
jobs: | ||
# Attempt to backport a merged pull request to the latest stable release | ||
backport: | ||
name: Backport pull request | ||
runs-on: ubuntu-latest | ||
|
||
# Don't run on closed unmerged pull requests, or pull requests with the "breaking" label | ||
if: github.event.pull_request.merged && !contains(github.event.pull_request.labels.*.name, 'breaking') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create backport pull requests | ||
uses: korthout/backport-action@v2 | ||
|
||
# Upload nightly docs to the website | ||
docs: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: sudo apt-get update | ||
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
toolchain: nightly-2024-02-01 | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-all-crates: "true" | ||
save-if: ${{ github.ref == 'refs/heads/main' }} | ||
- uses: ilammy/setup-nasm@v1 | ||
|
||
- name: cargo doc | ||
run: cargo doc --no-deps --workspace --all-features | ||
|
||
- name: Deploy | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: target/doc | ||
target-folder: api-docs/nightly | ||
repository-name: dioxuslabs/docsite | ||
clean: false | ||
token: ${{ secrets.DEPLOY_KEY }} | ||
|
||
# Attempt to backport a merged pull request to the latest stable release | ||
# | ||
# If the backported PR is succesfully merged | ||
# Any PR without the "breaking" label will be attempted to be backported to the latest stable release | ||
|
||
# Coverage is disabled until we can fix it | ||
# coverage: | ||
# name: Coverage | ||
# runs-on: ubuntu-latest | ||
# container: | ||
# image: xd009642/tarpaulin:develop-nightly | ||
# options: --security-opt seccomp=unconfined | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v4 | ||
# - name: Generate code coverage | ||
# run: | | ||
# apt-get update &&\ | ||
# apt-get install build-essential &&\ | ||
# apt install libwebkit2gtk-4.0-dev libgtk-3-dev libayatana-appindicator3-dev -y &&\ | ||
# cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml | ||
# - name: Upload to codecov.io | ||
# uses: codecov/codecov-action@v2 | ||
# with: | ||
# fail_ci_if_error: false | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Create a PR that promotes the current main pre-release to the next stable release | ||
# | ||
# IE if the current master version is 0.4.0-rc.7, this will create a PR to promote it to 0.4.0 | ||
# | ||
# - update the version in the Cargo.toml to v0.4.0 | ||
# - generate a v0.4 branch | ||
# - push the branch to the repository | ||
# - then bump 0.4.0-rc.1 to 0.5.0-rc.0 | ||
# | ||
# This means main will never be a "stable" release, and we can always merge breaking changes to main | ||
# and backport them to the latest stable release | ||
# | ||
# This is configured to be ran manually, but could honestly just be a release workflow | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
actions: write | ||
|
||
jobs: | ||
promote: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Publish the next pre-release | ||
run: | | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "github-actions[bot]" | ||
|
||
# go from eg 0.4.0-rc.7 to 0.4.0, committing the change | ||
cargo workspaces version -y minor | ||
|
||
# create a new branch for the release | ||
RELEASE_BRANCH=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version') | ||
RELEASE_BRANCH=v$(echo $RELEASE_BRANCH | sed 's/\.[0-9]*$//') | ||
git branch $RELEASE_BRANCH | ||
|
||
# go from 0.4.0 to 0.5.0-rc.0 | ||
cargo workspaces version -y preminor --pre-id rc | ||
|
||
# push the new branch to the repository | ||
git push origin $RELEASE_BRANCH | ||
|
||
# push the new version to the repository | ||
git push origin main |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jkelleyrtp It's great to see you're trying out backport-action 🙌
By default, backport-action only backports pull requests with a label matching the regex
^backport ([^ ]+)$
. If you want to always backport to a specific branch instead of having to label pull requests, you can use thetarget_branches
input.For example, if you want to always backport to the latest stable release branch, and this branch is called
latest-stable
, you can use: