From 48ff7ec68bc25704fa236baf47e428436ff656ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Sun, 21 Apr 2024 00:28:06 +1200 Subject: [PATCH] Remove PR machinery --- .github/workflows/release-cli.yml | 1 - .github/workflows/release-pr.ejs | 61 ------------------------------- .github/workflows/release-pr.yml | 54 --------------------------- .github/workflows/release-tag.yml | 45 ----------------------- crates/events/release.toml | 2 +- crates/signals/release.toml | 2 +- crates/supervisor/release.toml | 2 +- 7 files changed, 3 insertions(+), 164 deletions(-) delete mode 100644 .github/workflows/release-pr.ejs delete mode 100644 .github/workflows/release-pr.yml delete mode 100644 .github/workflows/release-tag.yml diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index 69b4c8a..e0aa948 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -1,7 +1,6 @@ name: CLI Release on: - workflow_call: workflow_dispatch: push: tags: diff --git a/.github/workflows/release-pr.ejs b/.github/workflows/release-pr.ejs deleted file mode 100644 index f392bc1..0000000 --- a/.github/workflows/release-pr.ejs +++ /dev/null @@ -1,61 +0,0 @@ - - -This is a release PR for **<%= crate.name %>** version **<%= version.actual %>**<% - if (version.actual != version.desired) { -%> (performing a <%= version.desired %> bump).<% - } else { -%>.<% - } -%> - -**Use squash merge.** - -<% if (crate.name == "watchexec-cli") { %> -Upon merging, this will automatically create the tag `v<%= version.actual %>`, build the CLI, and create a GitHub release. -You will still need to manually publish the cargo crate: - -``` -$ git switch main -$ git pull -$ git switch --detach v<%= version.actual %> -$ cargo publish -p <%= crate.name %> -``` -<% } else { %> -Remember to review the crate's changelog! - -Upon merging, this will create the tag `<%= crate.name %>-v<%= version.actual %>`. -You will still need to manually publish the cargo crate: - -``` -$ git switch main -$ git pull -$ git switch --detach <%= crate.name %>-v<%= version.actual %> -$ cargo publish -p <%= crate.name %> -``` -<% } %> - -To trigger builds initially: either close and then immediately re-open this PR once, or push to the branch (perhaps with edits to the README.md or CHANGELOG.md!). - -<% if (pr.releaseNotes) { %> ---- - -_Edit release notes into the section below:_ - - -<% if (crate.name == "watchexec-cli") { %> -### Release notes - -_Software development often involves running the same commands over and over. Boring! Watchexec is a simple, standalone tool that watches a path and runs a command whenever it detects modifications. Install it today with [`cargo-binstall watchexec-cli`](https://github.com/cargo-bins/cargo-binstall), from the binaries below, find it [in your favourite package manager](https://github.com/watchexec/watchexec/blob/main/doc/packages.md), or build it from source with `cargo install watchexec-cli`._ - -#### In this release: - -- - -#### Other changes: - -- -<% } else { %> -### Changelog -- -<% } %> -<% } %> diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml deleted file mode 100644 index 9831fe4..0000000 --- a/.github/workflows/release-pr.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Open a release PR -on: - workflow_dispatch: - inputs: - crate: - description: Crate to release - required: true - type: choice - options: - - cli - - lib - - bosion - - events - - ignore-files - - project-origins - - signals - - supervisor - - filterer/globset - - filterer/ignore - - filterer/tagged - version: - description: Version to release - required: true - type: string - default: patch - -jobs: - make-release-pr: - permissions: - id-token: write # Enable OIDC - pull-requests: write - contents: write - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: chainguard-dev/actions/setup-gitsign@main - - name: Install cargo-release - uses: taiki-e/install-action@v2 - with: - tool: cargo-release - - - uses: cargo-bins/release-pr@v2 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - version: ${{ inputs.version }} - crate-path: crates/${{ inputs.crate }} - pr-release-notes: ${{ inputs.crate == 'cli' }} - pr-label: release - pr-template-file: .github/workflows/release-pr.ejs - env: - GITSIGN_LOG: /tmp/gitsign.log - - - run: cat /tmp/gitsign.log - if: ${{ failure() }} diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml deleted file mode 100644 index 0eb15a6..0000000 --- a/.github/workflows/release-tag.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Tag a release -on: - push: - branches: - - main - tags-ignore: - - "*" - -jobs: - make-tag: - runs-on: ubuntu-latest - # because we control the release PR title and only allow squashes, - # PRs that are named `release: {crate-name} v{version}` will get tagged! - # the commit message will look like: `release: {crate-name} v{version} (#{pr-number})` - if: "startsWith(github.event.head_commit.message, 'release: ')" - steps: - - name: Extract tag from commit message - env: - COMMIT_MESSAGE: ${{ github.event.head_commit.message }} - run: | - set -euxo pipefail - - message="$(head -n1 <<< "$COMMIT_MESSAGE")" - crate="$(cut -d ' ' -f 2 <<< "${message}")" - version="$(cut -d ' ' -f 3 <<< "${message}")" - if [[ "$crate" == "watchexec-cli" ]]; then - echo "CUSTOM_TAG=${version}" >> $GITHUB_ENV - else - echo "CUSTOM_TAG=${crate}-${version}" >> $GITHUB_ENV - fi - - - uses: actions/checkout@v4 - - name: Push release tag - id: tag_version - uses: mathieudutour/github-tag-action@v6.2 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - custom_tag: ${{ env.CUSTOM_TAG }} - tag_prefix: '' - - release-cli: - needs: make-tag - if: "startsWith(github.event.head_commit.message, 'release: watchexec-cli v')" - uses: ./.github/workflows/release-cli.yml - secrets: inherit diff --git a/crates/events/release.toml b/crates/events/release.toml index a5c4abb..c42d61a 100644 --- a/crates/events/release.toml +++ b/crates/events/release.toml @@ -1,5 +1,5 @@ pre-release-commit-message = "release: events v{{version}}" -tag-prefix = "events-" +tag-prefix = "watchexec-events-" tag-message = "watchexec-events {{version}}" [[pre-release-replacements]] diff --git a/crates/signals/release.toml b/crates/signals/release.toml index a6f1fe1..9a0dfbf 100644 --- a/crates/signals/release.toml +++ b/crates/signals/release.toml @@ -1,5 +1,5 @@ pre-release-commit-message = "release: signals v{{version}}" -tag-prefix = "signals-" +tag-prefix = "watchexec-signals-" tag-message = "watchexec-signals {{version}}" [[pre-release-replacements]] diff --git a/crates/supervisor/release.toml b/crates/supervisor/release.toml index e5bfd75..727e2d3 100644 --- a/crates/supervisor/release.toml +++ b/crates/supervisor/release.toml @@ -1,5 +1,5 @@ pre-release-commit-message = "release: supervisor v{{version}}" -tag-prefix = "supervisor-" +tag-prefix = "watchexec-supervisor-" tag-message = "watchexec-supervisor {{version}}" [[pre-release-replacements]]