| 1 | name: publish |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [main] |
| 6 | |
| 7 | jobs: |
| 8 | publish: |
| 9 | runs-on: ubuntu-latest |
| 10 | steps: |
| 11 | - uses: actions/checkout@v2 |
| 12 | |
| 13 | - name: Configure git user |
| 14 | run: | |
| 15 | git config user.name "GitHub Actions" |
| 16 | git config user.email [email protected] |
| 17 | |
| 18 | - name: Install cargo-release |
| 19 | uses: actions-rs/[email protected] |
| 20 | with: |
| 21 | crate: cargo-release |
| 22 | version: latest |
| 23 | |
| 24 | - name: Publish |
| 25 | run: | |
| 26 | echo "${{ secrets.CRATES_IO_TOKEN }}" | cargo login |
| 27 | git restore Cargo.lock # FIXME: likely an issue during resolve causing this |
| 28 | cargo release --no-confirm --no-push -x |
| 29 | |
| 30 | - name: Push changes |
| 31 | uses: ad-m/github-push-action@master |
| 32 | with: |
| 33 | tags: true |
| 34 | force: true |
| 35 | branch: ${{ github.ref }} |
| 36 | github_token: ${{ secrets.GITHUB_TOKEN }} |