From 300b1dbc8c1a4d7c54ed824646e1c709d6773955 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Wed, 26 Aug 2026 12:33:10 -0400 Subject: [PATCH] Make the CI step 'Create tag' faster --- .github/workflows/main.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a3b8755e2cbc0..0a033d9d40d76 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,20 +61,15 @@ jobs: dpkg-deb --root-owner-group --build install mv install.deb gcc-15.deb - - name: Compute tag name - id: tag_name - run: | - git_hash=$(git rev-parse "$GITHUB_SHA") - echo "TAG_NAME=$git_hash" >> $GITHUB_OUTPUT - - name: Create tag if: github.ref == 'refs/heads/master' continue-on-error: true - uses: laputansoft/github-tag-action@v4.6 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - create_annotated_tag: true - tag: master-${{ steps.tag_name.outputs.TAG_NAME }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh api repos/${{ github.repository }}/git/refs \ + -f ref=refs/tags/master-$GITHUB_SHA \ + -f sha=$GITHUB_SHA - name: Create release if: github.ref == 'refs/heads/master' && !matrix.version.use_patch @@ -83,7 +78,7 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: /home/runner/work/gcc/install/usr/lib/libgccjit.so.0.0.1 asset_name: libgccjit${{ matrix.os.asset_name_suffix }}.so - tag: master-${{ steps.tag_name.outputs.TAG_NAME }} + tag: master-${{ github.sha }} - name: Create release if: github.ref == 'refs/heads/master' @@ -92,4 +87,4 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: /home/runner/work/gcc/gcc-15.deb asset_name: ${{ matrix.version.asset_name }}${{ matrix.os.asset_name_suffix }}.deb - tag: master-${{ steps.tag_name.outputs.TAG_NAME }} + tag: master-${{ github.sha }}