diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4c61109 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + tag: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 2 + - uses: salsify/action-detect-and-tag-new-version@v2 + id: detect_tag + with: + create-tag: true + version-command: cargo read-manifest | jq -r .version + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: softprops/action-gh-release@v1 + - run: cargo publish + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}