From d8a43bc73a6ff5c15cd12ce7dcf49902ee8031ec Mon Sep 17 00:00:00 2001 From: "Garen J. Torikian" Date: Mon, 14 Nov 2022 10:19:11 -0300 Subject: [PATCH] Allow for manual dispatch --- .github/workflows/tag_and_release.yml | 63 ++++++++++++++------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/.github/workflows/tag_and_release.yml b/.github/workflows/tag_and_release.yml index 3567c8c1..0f2e4a26 100644 --- a/.github/workflows/tag_and_release.yml +++ b/.github/workflows/tag_and_release.yml @@ -1,6 +1,7 @@ name: Tag and Release on: + workflow_dispatch: push: branches: - c-api-stable @@ -47,39 +48,39 @@ jobs: fi done - # release: - # needs: ["c_gem"] - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 + release: + needs: ["c_gem"] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 - # - name: Set up Ruby 3.1 - # uses: ruby/setup-ruby@v1 - # with: - # rubygems: latest - # ruby-version: 3.1 - # bundler-cache: true + - name: Set up Ruby 3.1 + uses: ruby/setup-ruby@v1 + with: + rubygems: latest + ruby-version: 3.1 + bundler-cache: true - # - name: Configure Git - # run: | - # git config --local user.email "actions@github.com" - # git config --local user.name "Actions Auto Build" + - name: Configure Git + run: | + git config --local user.email "actions@github.com" + git config --local user.name "Actions Auto Build" - # - name: Get current version - # id: version-label - # run: | - # VERSION=$(grep VERSION lib/commonmarker/version.rb | head -n 1 | cut -d'"' -f2) - # echo "version=${VERSION}" >> $GITHUB_OUTPUT + - name: Get current version + id: version-label + run: | + VERSION=$(grep VERSION lib/commonmarker/version.rb | head -n 1 | cut -d'"' -f2) + echo "version=${VERSION}" >> $GITHUB_OUTPUT - # - name: Create tag - # run: | - # git tag -a v${{ steps.version-label.outputs.version }} -m "Release v${{ steps.version-label.outputs.version }}" - # git push origin --tags + - name: Create tag + run: | + git tag -a v${{ steps.version-label.outputs.version }} -m "Release v${{ steps.version-label.outputs.version }}" + git push origin --tags - # - name: Publish release - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # run: | - # gh release create v${{ steps.version-label.outputs.version }} --generate-notes + - name: Publish release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create v${{ steps.version-label.outputs.version }} --generate-notes