diff --git a/.github/workflows/assets.yaml b/.github/workflows/assets.yaml deleted file mode 100644 index 4847766..0000000 --- a/.github/workflows/assets.yaml +++ /dev/null @@ -1,57 +0,0 @@ -name: Upload Assets - -on: - push: - tags: - - v[0-9]+.* - -env: - CARGO_INCREMENTAL: 0 - CARGO_TERM_COLOR: always - RUSTFLAGS: -D warnings - RUST_BACKTRACE: 1 - -defaults: - run: - shell: bash - -jobs: - upload-assets: - name: ${{ matrix.target }} - strategy: - matrix: - include: - - target: x86_64-unknown-linux-gnu - tap: true - - target: x86_64-apple-darwin - os: macos-latest - tap: true - - target: x86_64-pc-windows-msvc - os: windows-latest - tap: false - - target: x86_64-unknown-linux-musl - tap: false - runs-on: ${{ matrix.os || 'ubuntu-latest' }} - steps: - - uses: actions/checkout@v2 - - uses: dtolnay/rust-toolchain@stable - - uses: taiki-e/upload-rust-binary-action@v1 - with: - bin: zine - target: ${{ matrix.target }} - tar: all - zip: windows - features: openssl-vendored - env: - GITHUB_TOKEN: ${{ secrets.TOKEN }} - CARGO_PROFILE_RELEASE_LTO: true - - name: Get the version - id: get_version - run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) - - name: Update zine homebrew formula - if: ${{ matrix.tap == true }} - run: | - curl -X POST -H "Accept: application/vnd.github.v3+json" \ - -H "Authorization: token ${{ secrets.TOKEN }}" \ - -d '{"event_type":"version-updated","client_payload":{"version":"${{ steps.get_version.outputs.VERSION }}"}}' \ - https://api.github.com/repos/zineland/homebrew-tap/dispatches \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4e76b37..2a5e85f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,7 +16,46 @@ defaults: shell: bash jobs: - create-release: + upload-assets: + name: ${{ matrix.target }} + strategy: + matrix: + include: + - target: x86_64-unknown-linux-gnu + tap: true + - target: x86_64-apple-darwin + os: macos-latest + tap: true + - target: x86_64-pc-windows-msvc + os: windows-latest + tap: false + - target: x86_64-unknown-linux-musl + tap: false + runs-on: ${{ matrix.os || 'ubuntu-latest' }} + steps: + - uses: actions/checkout@v2 + - uses: dtolnay/rust-toolchain@stable + - uses: taiki-e/upload-rust-binary-action@v1 + with: + bin: zine + target: ${{ matrix.target }} + tar: all + zip: windows + features: openssl-vendored + env: + GITHUB_TOKEN: ${{ secrets.TOKEN }} + CARGO_PROFILE_RELEASE_LTO: true + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) + - name: Update zine homebrew formula + if: ${{ matrix.tap == true }} + run: | + curl -X POST -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: token ${{ secrets.TOKEN }}" \ + -d '{"event_type":"version-updated","client_payload":{"version":"${{ steps.get_version.outputs.VERSION }}"}}' \ + https://api.github.com/repos/zineland/homebrew-tap/dispatches + cargo-publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2