Publish All #26
This file contains hidden or 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
| name: Publish All | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| ci: | |
| name: Run CI | |
| uses: ./.github/workflows/ci.yml | |
| secrets: | |
| NGROK_AUTHTOKEN: ${{ secrets.NGROK_AUTHTOKEN }} | |
| MATURIN_PASSWORD: ${{ secrets.MATURIN_PASSWORD }} | |
| permissions: | |
| contents: write | |
| with: | |
| publish: true | |
| tag-release: | |
| name: Tag Release | |
| needs: ci | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: jrobsonchase/[email protected] | |
| - name: Tag Release | |
| run: | | |
| version="$(grep '^version =' Cargo.toml | head -n1 | awk -F\" '{print $2}')" | |
| tag="v${version}" | |
| git config user.name "GitHub Action" | |
| git config user.email [email protected] | |
| echo "Version: ${version} tag: $tag" | |
| echo "Fetching all tags in the repository" | |
| git fetch --tags | |
| if git rev-parse "refs/tags/$tag" >/dev/null 2>&1; then | |
| echo "Tag $tag already exists, skipping tag creation." | |
| else | |
| echo "Tag $tag does not exist, pushing tag." | |
| git tag -a -m "Version ${version}" $tag | |
| git push --tags | |
| fi |