From 7e8979a89e36fa857f143c604e324394086c9de3 Mon Sep 17 00:00:00 2001 From: alex <16batesa@gmail.com> Date: Sun, 22 Aug 2021 17:56:17 +0100 Subject: [PATCH] publish releases (#7) --- .github/workflows/build.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f506593..c9cc12d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,12 +12,14 @@ jobs: - { OS: 'ubuntu-latest', CFLAGS: '-std=gnu89 -m32 -static', - HOST: 'i386-pc-linux' + HOST: 'i386-pc-linux', + ARCHIVE_NAME: 'linux.tar.gz' } - { OS: 'macos-latest', CFLAGS: '-std=gnu89 -Wno-return-type -Wno-error -Wno-implicit-function-declaration', - HOST: 'i386-apple-darwin' + HOST: 'i386-apple-darwin', + ARCHIVE_NAME: 'mac.tar.gz' } name: Building cc1 for ${{ matrix.TARGET.OS }} @@ -60,3 +62,14 @@ jobs: cpp cc1 xgcc + - name: Create release archive + shell: bash + run: | + cp xgcc gcc + tar -czf ${{ matrix.TARGET.ARCHIVE_NAME }} cpp cc1 gcc + - name: Update release + uses: johnwbyrd/update-release@v1.0.0 + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + with: + token: ${{ secrets.GITHUB_TOKEN }} + files: ${{ matrix.TARGET.ARCHIVE_NAME }}