diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 927ca5c1a..aeb44fd5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,5 +80,15 @@ jobs: title: "Development Build" files: | release/**/* + if: "!startsWith(github.ref, 'refs/tags/v')" + + - uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + title: ${{ github.ref_name }} + files: | + release/**/* + if: "startsWith(github.ref, 'refs/tags/v')" # vim: ts=2:sw=2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index a7401e96c..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: release - -on: - push: - tags: ['v*'] - -env: - ENABLE_PYO3: 1 - -jobs: - release: - strategy: - fail-fast: false - matrix: - target: - - x86_64-unknown-linux-gnu - - arm-unknown-linux-gnueabihf - include: - - target: x86_64-unknown-linux-gnu - cross: "" - image: "vtavernier/cross:x86_64-bullseye" - - target: arm-unknown-linux-gnueabihf - cross: arm-linux-gnueabihf- - image: "vtavernier/cross:raspberrypi" - - runs-on: ubuntu-20.04 - - steps: - - name: Checkout source code - uses: actions/checkout@v2 - with: - submodules: true - - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: ${{ matrix.target }} - profile: minimal - override: true - - - name: Build project - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: build - args: --release --target=${{ matrix.target }} - - - name: Strip resulting binary - run: docker run -v ${{ github.workspace }}:/src ${{ matrix.image }} ${{ matrix.cross }}strip /src/target/${{ matrix.target }}/release/hyperiond - - - name: Prepare release - run: | - ./ci/prepare-release.sh ${{ matrix.target }} - - - name: Upload to GitHub release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: 'release/*' - file_glob: true - tag: ${{ github.ref }} - overwrite: true - -# vim: ts=2:sw=2