-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5610bc
commit c2d3b0b
Showing
3 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
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,30 @@ | ||
name: Publish | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
tags: | ||
type: string | ||
required: true | ||
secrets: | ||
CARGO_REGISTRY_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Source Code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-tags: true | ||
- name: Install Rust Toolchain (stable) | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Setup Project | ||
run: cargo xtask setup | ||
- name: Publish to Crates.io | ||
if: contains(inputs.tags, '@') | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
run: cargo xtask crate:publish | ||
|
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,24 @@ | ||
#!/bin/bash | ||
|
||
echo | ||
echo ":::: GIT Commit:" | ||
git log -1 | ||
|
||
echo | ||
echo ":::: GIT Tags:" | ||
git tag --points-at HEAD | ||
|
||
taglistStr=$(git tag --points-at HEAD) | ||
declare -a taglist=($taglistStr) | ||
tags="" | ||
|
||
for tag in "${taglist[@]}"; do | ||
tags="${tags} ${tag}" | ||
done | ||
|
||
echo | ||
echo ":::: Set Action Output: Tags:" | ||
echo "tags=$tags" >> $GITHUB_OUTPUT | ||
echo $tags | ||
echo | ||
|