Skip to content

Merge pull request #41 from moia-oss/fix_norelease #35

Merge pull request #41 from moia-oss/fix_norelease

Merge pull request #41 from moia-oss/fix_norelease #35

Workflow file for this run

name: Publish
on:
push:
branches:
- main
jobs:
release-on-push:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.BOT_ACCOUNT_PAT }}
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Calculate next version
id: calc_version
uses: rymndhng/release-on-push-action@master
with:
bump_version_scheme: patch
tag_prefix: ""
dry_run: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set version
if: ${{ steps.calc_version.outputs.version != "" }}

Check failure on line 31 in .github/workflows/publish.yaml

View workflow run for this annotation

GitHub Actions / Publish

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yaml (Line: 31, Col: 13): Unexpected symbol: '""'. Located at position 39 within expression: steps.calc_version.outputs.version != "" .github/workflows/publish.yaml (Line: 42, Col: 13): Unexpected symbol: '""'. Located at position 39 within expression: steps.calc_version.outputs.version != ""
run: |
sed -i "s/^version = \".*\"$/version = \"${{ steps.calc_version.outputs.version }}\"/" Cargo.toml
- name: Publish new version to main
if: ${{ steps.calc_version.outputs.version }} != ""
run: |
git config --global user.email "[email protected]"
git config --global user.name "MOIA Rust Maintainers"
git commit -am "Release ${{ steps.calc_version.outputs.version }} [skip ci]"
git push
- name: Create github release
if: ${{ steps.calc_version.outputs.version != "" }}
uses: rymndhng/release-on-push-action@master
with:
bump_version_scheme: patch
tag_prefix: ""
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish
if: ${{ steps.calc_version.outputs.version != "" }}
run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}