Skip to content

Commit

Permalink
uses taiki-e actions
Browse files Browse the repository at this point in the history
  • Loading branch information
shahadarsh committed Dec 29, 2023
1 parent 53f25f5 commit db33239
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/cargo_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,9 @@ on:
branches:
- gh-release

push:
branches:
- 'gh-release'

jobs:

cargo_build:
# On a pull request, this is validating that the version
# is not already published to crates.io, and on a push to
# main or release branches, it is publishing if the version
# does not exist, ignoring if the version is already
# published.
name: Cargo build
runs-on: ubuntu-20.04
container:
Expand All @@ -28,9 +19,9 @@ jobs:
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Determine which flags to use on cargo publish
- name: Cargo build
working-directory: ./tembo-cli
id: cargo_flags
id: cargo_build
run: |
set -x
cargo build --release --target=x86_64-unknown-linux-musl
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/cargo_build_v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release

permissions:
contents: write

on:
pull_request:
branches:
- gh-release

push:
branches:
- 'gh-release'

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
# (optional) Path to changelog.
changelog: CHANGELOG.md
# (required) GitHub token for creating GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}

upload-assets:
needs: create-release
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-20.04
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install cross-compilation tools
uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
if: startsWith(matrix.os, 'ubuntu')
- uses: taiki-e/upload-rust-binary-action@v1
working-directory: ./tembo-cli
with:
# (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload.
# Note that glob pattern is not supported yet.
bin: ...
# (optional) Target triple, default is host triple.
target: ${{ matrix.target }}
# (required) GitHub token for uploading assets to GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit db33239

Please sign in to comment.