Skip to content

Commit

Permalink
Merge pull request #18 from anduril/dogun/publish-crate
Browse files Browse the repository at this point in the history
Publish crate workflow
  • Loading branch information
dogun-anduril authored Nov 21, 2024
2 parents 69b77c2 + 0ac05da commit b2c1b6e
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 32 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/automerge.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release
on:
push:
branches:
- master

permissions:
contents: read

# Only allow one release workflow to execute at a time, since each release
# workflow uses shared resources (git tags, package registries)
concurrency:
group: ${{ github.workflow }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install dependencies
run: |
cargo install cargo-edit
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
with:
semantic_version: 24.2.0
extra_plugins: |
@semantic-release/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_API_TOKEN: ${{ secrets.CARGO_API_TOKEN }}
11 changes: 11 additions & 0 deletions .releaserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
plugins: [
"@semantic-release/commit-analyzer",
'@semantic-release/release-notes-generator',
"@semantic-release/github",
[
"@semantic-release/exec", {
"prepareCmd": "cargo set-version ${nextRelease.version}",
"publishCmd": "cargo publish --token ${env.CARGO_API_TOKEN} --allow-dirty --dry-run"
},
]
]

0 comments on commit b2c1b6e

Please sign in to comment.