Skip to content

Commit

Permalink
ci: Use cargo-release to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanty committed Aug 17, 2024
1 parent 22f7bce commit 123b7a2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 64 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/publish_crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@ jobs:
steps:
- uses: actions/checkout@v4.1.7
- uses: Swatinem/rust-cache@v2
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_TOKEN }}
check-repo: false
- name: Install cargo-binstall
run: |
gh release download "v${BINSTALL_VERSION}" --repo "cargo-bins/cargo-binstall" --pattern "cargo-binstall-x86_64-unknown-linux-musl.tgz"
tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz
cp cargo-binstall $HOME/.cargo/bin
env:
GH_TOKEN: ${{ github.token }}
BINSTALL_VERSION: 1.8.0
- name: Install cargo-release
run: cargo binstall --no-confirm cargo-release
- run: cargo release publish --workspace --execute
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }}
15 changes: 0 additions & 15 deletions .github/workflows/release_dry_run.yml

This file was deleted.

45 changes: 0 additions & 45 deletions knope.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,51 +23,6 @@ path = "artifacts/knope-x86_64-apple-darwin.tgz"
[[packages.knope.assets]]
path = "artifacts/knope-aarch64-apple-darwin.tgz"

[[workflows]]
name = "prepare-release"

[[workflows.steps]]
type = "Command"
command = "git switch -c release"

[[workflows.steps]]
type = "PrepareRelease"

[[workflows.steps]]
type = "Command"
shell = true
command = "npx prettier CHANGELOG.md --write && git add CHANGELOG.md"

[[workflows.steps]]
type = "Command"
command = "git commit -m \"chore: prepare release\""

[[workflows.steps]]
type = "Command"
command = "git push --force --set-upstream origin release"

[[workflows.steps]]
type = "CreatePullRequest"
base = "main"

[workflows.steps.title]
template = "chore: prepare releases"

[workflows.steps.body]
template = "This PR was created by Knope. Merging it will create a new release"

[[workflows]]
name = "release"

[[workflows.steps]]
type = "Release"

[[workflows]]
name = "document-change"

[[workflows.steps]]
type = "CreateChangeFile"

[github]
owner = "knope-dev"
repo = "knope"
Expand Down

0 comments on commit 123b7a2

Please sign in to comment.