From ebf35c0c76634b62b31dbcb63c71e86d46b54398 Mon Sep 17 00:00:00 2001 From: angie Date: Wed, 10 May 2023 22:16:16 -0400 Subject: [PATCH] Do not do automatic releases on each commit --- .github/workflows/build.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 45ebb24..953b800 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: name: Building binutils for ${{ matrix.TARGET.OS }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install dependencies (Ubuntu) shell: bash @@ -32,10 +32,12 @@ jobs: run: | sudo apt-get update sudo apt-get install -y build-essential bison file gperf + - name: Configure for mips shell: bash run: | ./configure --target=mips-kmc-elf --prefix=/opt/cross --disable-gprof --disable-gdb --disable-werror --host=${{ matrix.TARGET.HOST }} --build=${{ matrix.TARGET.HOST }} + - name: Make shell: bash run: | @@ -44,11 +46,13 @@ jobs: make -C libiberty CFLAGS="${{ matrix.TARGET.CFLAGS }}" make -C gas CFLAGS="${{ matrix.TARGET.CFLAGS }}" make -C binutils CFLAGS="${{ matrix.TARGET.CFLAGS }}" + - name: Test for file shell: bash run: | test -f binutils/ar file binutils/ar + - name: Create release archive shell: bash run: | @@ -68,15 +72,16 @@ jobs: chmod +x objcopy chmod +x c++filt tar -czf ${{ matrix.TARGET.ARCHIVE_NAME }} ar as strip objcopy c++filt + - name: Upload archive uses: actions/upload-artifact@v2 with: name: binutils-2.6-${{ matrix.TARGET.OS }} path: | ${{ matrix.TARGET.ARCHIVE_NAME }} - - name: Update release - uses: johnwbyrd/update-release@v1.0.0 - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + + - name: Publish release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') with: - token: ${{ secrets.GITHUB_TOKEN }} files: ${{ matrix.TARGET.ARCHIVE_NAME }}