diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..24e502a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release +on: + push: + branches: + - main + +jobs: + deploy: + name: Tag if new release + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Read version number + id: read_toml + uses: outcome-co/action-read-toml@v2.0.10 + with: + path: Cargo.toml + key: package.version + - name: Set tag env variable + run: echo IMAGE_TAG=v${{steps.read_toml.outputs.package_version}} >> $GITHUB_ENV + - uses: ncipollo/release-action@v1 + continue-on-error: true + with: + allowUpdates: false + tag: ${{ env.IMAGE_TAG }} + token: ${{ secrets.GITHUB_TOKEN }}