Skip to content

Commit

Permalink
Actions (#120)
Browse files Browse the repository at this point in the history
* add github action

* add codecov token

* add lcov.info to .gitignore

* bump

* use cargo set-version
  • Loading branch information
smedegaard authored Dec 2, 2024
1 parent 916e683 commit 0afa2c3
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

on:
release:
types: [created,updated]
types: [created]

jobs:
publish:
Expand All @@ -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}
Expand Down

0 comments on commit 0afa2c3

Please sign in to comment.