diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4b714c1..147b3ef 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,6 +6,8 @@ on: - main tags: - '**' # TODO: add a good pattern match on version XX.XX.XX +permissions: + contents: write jobs: publish: @@ -13,6 +15,8 @@ jobs: if: startsWith(github.ref, 'refs/tags') steps: - uses: actions/checkout@v3 + with: + ref: 'main' - name: Installing cargo-edit run: cargo install cargo-edit # TODO: check if tag is superior than the current version @@ -26,6 +30,7 @@ jobs: git config --global user.name "pilou" git add . git commit -m "release $GITHUB_REF_NAME" + git push --force - name: cargo login run: cargo login ${{ secrets.CRATES_IO_API_TOKEN }} - name: Publishing