From 0afa2c3cc8dabce34346837659f0545833295930 Mon Sep 17 00:00:00 2001 From: Anders Smedegaard Pedersen Date: Mon, 2 Dec 2024 20:14:40 +0100 Subject: [PATCH] Actions (#120) * add github action * add codecov token * add lcov.info to .gitignore * bump * use cargo set-version --- .github/workflows/release.yaml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5ffc45a..64a0fe3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,7 +2,7 @@ name: Release on: release: - types: [created,updated] + types: [created] jobs: publish: @@ -11,8 +11,24 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Bump version - uses: tj-actions/cargo-bump@v3 + - name: Get release version + id: get_version + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + + - name: Update Cargo.toml version + run: | + cargo set-version "${{ steps.get_version.outputs.RELEASE_VERSION }}" + + - name: setup git config + run: | + git config user.name "GitHub Actions" + git config user.email "<>" + + - name: Commit and push changes + uses: devops-infra/action-commit-push@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + commit_message: Replaced foo with bar - name: Publish to crates.io run: cargo publish --token ${CRATES_TOKEN}