diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f3cdcb12..c93e3452c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,11 +10,14 @@ on: jobs: VersionFile: runs-on: ubuntu-latest + outputs: + version: ${{ steps.bump.outputs.VERSION }} steps: - - name: Bump Version Info For Release - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + - id: bump + name: Bump Version Info For Release run: | curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/latest | jq -r '[.tag_name][0] | split(".") as $ver | $ver[-1]|tonumber as $last | $ver[:-1] as $first | $first + [$last+1] | map(tostring) | join(".")' > VERSION + echo "::set-output name=VERSION::$( VERSION ./scripts/travis.sh macos-latest initialize ./scripts/travis.sh macos-latest build Docker_Linux: @@ -58,6 +62,7 @@ jobs: - uses: actions/checkout@v2 - name: Build LLVM ${{ matrix.llvm }} on ${{ matrix.ubuntu }} run: | + echo ${{needs.VersionFile.outputs.version}} > VERSION docker build . -t docker.pkg.github.com/lifting-bits/remill/llvm${{ matrix.llvm }}-ubuntu${{ matrix.ubuntu }}-amd64:latest -f Dockerfile --build-arg UBUNTU_VERSION=${{ matrix.ubuntu }} --build-arg ARCH=amd64 --build-arg LLVM_VERSION=${{ matrix.llvm }} - name: Test Remill with LLVM ${{ matrix.llvm }} on ${{ matrix.ubuntu }} run: | @@ -89,24 +94,19 @@ jobs: name: remill-llvm${{ matrix.llvm }}-ubuntu${{ matrix.ubuntu }}-amd64.tar.xz path: artifacts/remill-llvm${{ matrix.llvm }}-ubuntu${{ matrix.ubuntu }}-amd64.tar.xz windows: + needs: [VersionFile] runs-on: windows-latest steps: - uses: actions/checkout@v2 - name: Run Tests continue-on-error: true # for now run: | + echo ${{needs.VersionFile.outputs.version}} > VERSION scripts/travis.bat CreateRelease: - needs: [macOS, Docker_Linux] + needs: [macOS, Docker_Linux, VersionFile] runs-on: ubuntu-latest steps: - - name: Increment Release Version - id: release_ver - if: github.event_name == 'push' && github.ref == 'refs/heads/master' - run: | - echo "::set-output name=VERSION::$(