Skip to content

Commit

Permalink
Actions (#123)
Browse files Browse the repository at this point in the history
* add github action
  • Loading branch information
smedegaard authored Dec 2, 2024
1 parent dccbbfe commit 0487925
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@ name: Release

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

permissions:
contents: write

jobs:
publish:
name: Publish to crates.io
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get release version
id: get_version
Expand All @@ -19,17 +24,12 @@ jobs:
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
run: |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git add Cargo.toml
git commit -m '[Github Actions] update version to ${{ steps.get_version.outputs.RELEASE_VERSION }}'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git push origin HEAD:main
- name: Publish to crates.io
run: cargo publish --token ${CRATES_TOKEN}
Expand Down

0 comments on commit 0487925

Please sign in to comment.