diff --git a/.github/workflows/tag-and-release.yml b/.github/workflows/tag-and-release.yml new file mode 100644 index 00000000..b490af9c --- /dev/null +++ b/.github/workflows/tag-and-release.yml @@ -0,0 +1,40 @@ +name: Tag and Release + +on: + workflow_dispatch: + inputs: + # See https://github.com/hyper63/hyper-ci-bump#inputs for available inputs for the bump action + version: + description: the semver version to bump to + required: true + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + # Allows for pushes from this workflow to trigger subsequent workflows + token: ${{ secrets.CI_GITHUB_TOKEN }} + - uses: actions/setup-node@v2 + with: + node-version: 14.x + - name: set git user + run: | + git config --global user.name "${{ github.actor }}" + git config --global user.email "${{ github.actor }}@users.noreply.github.com" + - name: bump + id: bump + uses: hyper63/hyper-ci-bump@main + with: + bump-to: ${{github.event.inputs.version}} + - name: push + run: | + git push --follow-tags + - name: create github release + if: steps.bump.outputs.tag + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{steps.bump.outputs.tag}} + env: + GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}