Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): release-binary-assets.yml #111

Merged
merged 1 commit into from
Feb 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,21 @@ jobs:
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

# https://github.com/mislav/bump-homebrew-formula-action
publish-to-brew:
name: post / homebrew
needs: [publish]
runs-on: macos-latest
steps:
- uses: mislav/bump-homebrew-formula-action@v1
with:
formula-name: t-rec
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}

release:
name: post / github release
needs: publish
needs: [publish]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
26 changes: 9 additions & 17 deletions .github/workflows/release-binary-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ on:
workflow_dispatch:

jobs:
# https://github.com/mislav/bump-homebrew-formula-action
publish-to-brew:
name: post / homebrew
runs-on: macos-latest
steps:
- uses: mislav/bump-homebrew-formula-action@v1
with:
formula-name: t-rec
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}

release:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -58,10 +47,10 @@ jobs:
env:
TARGET: ${{ matrix.target }}
TAG: ${{ github.event.release.tag_name }}
FILENAME: ${{ matrix.binName }}-$TAG-$TARGET.tar.gz
run: |
filename="t-rec-$TAG-$TARGET.tar.gz"
tar -czvf "$filename" README.md LICENSE -C "target/$TARGET/release" "${{ matrix.binName }}"
echo "::set-output name=filename::$filename"
tar -czvf "$FILENAME" README.md LICENSE -C "target/$TARGET/release" "${{ matrix.binName }}"
echo "::set-output name=filename::$FILENAME"
- name: Upload Archive
uses: ncipollo/[email protected]
with:
Expand All @@ -80,19 +69,22 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: build .deb file
env:
TARGET: x86_64-unknown-linux-musl
TAG: ${{ github.event.release.tag_name }}
uses: sassman/rust-deb-builder@v1
- name: Archive deb artifact
uses: actions/upload-artifact@v2
with:
name: t-rec-amd64-static.deb
path: target/x86_64-unknown-linux-musl/debian/t-rec*.deb
name: t-rec-$TAG-$TARGET.deb
path: target/$TARGET/debian/t-rec*.deb
- name: upload deb file
uses: ncipollo/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: target/x86_64-unknown-linux-musl/debian/t-rec*.deb
artifacts: target/$TARGET/debian/t-rec*.deb
artifactContentType: application/octet-stream
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
Expand Down