Skip to content

Commit

Permalink
Release action
Browse files Browse the repository at this point in the history
  • Loading branch information
TGRCdev committed Jan 31, 2025
1 parent 32501ec commit d28e17f
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cargo-prerelease.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pre-release-commit-message = "Publish Pre-release"
tag = false
2 changes: 2 additions & 0 deletions .github/workflows/cargo-release-patch.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pre-release-commit-message = "Publish Patch"
tag-name = "v{{version}}"
2 changes: 0 additions & 2 deletions .github/workflows/cargo-release.toml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Git Config
run: git config user.name "GitHub Action" && git config user.email "[email protected]"
- name: Publish RC
run: cargo-release release alpha --execute --no-confirm --config .github/workflows/cargo-release.toml
run: cargo-release release alpha --execute --no-confirm --config .github/workflows/cargo-prerelease.toml
- name: Logout of Cargo
if: always()
run: cargo logout
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish (Patch)

on: [workflow_dispatch]

env:
CARGO_TERM_COLOR: always

jobs:
publish-release:
name: Publish Release
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Install cargo-binstall
uses: cargo-bins/[email protected]
- name: Install cargo-release
run: cargo-binstall cargo-release
- name: Login to Cargo
run: cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Git Config
run: git config user.name "GitHub Action" && git config user.email "[email protected]"
- name: Publish Release
run: cargo-release release patch --execute --no-confirm --config .github/workflows/cargo-release-patch.toml
- name: Logout of Cargo
if: always()
run: cargo logout

0 comments on commit d28e17f

Please sign in to comment.