Skip to content

Merge pull request #375 from ohkami-rs/v0.23 #3

Merge pull request #375 from ohkami-rs/v0.23

Merge pull request #375 from ohkami-rs/v0.23 #3

Workflow file for this run

name: Publish
on:
push:
tags: ['v*']
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- run: |
BRANCHS=$(git branch --contains ${{ github.ref_name }})
set -- $BRANCHS
for BRANCH in $BRANCHS ; do
if [[ "$BRANCH" == "main" ]]; then
exit 0
fi
done
exit 1
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref_name }} --generate-notes
- name: Publish packages
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
run: |
cargo publish -p ohkami_openapi
cargo publish -p ohkami_macros
cargo publish -p ohkami_lib
cargo publish -p ohkami