-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
149 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Push fig spec | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
push-to-fig-autocomplete: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v2 | ||
- name: Install rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
- name: Place fig spec in correct folder | ||
shell: bash | ||
run: | | ||
cp target/release/build/**/out/pattrick.ts pattrick.ts | ||
- name: Create Autocomplete PR ## Create the autocomplete PR using this action | ||
uses: withfig/push-to-fig-autocomplete-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
autocomplete-spec-name: pattrick | ||
spec-path: pattrick.ts | ||
integration: clap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Build release binaries | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
target: | ||
[ | ||
aarch64-unknown-linux-gnu, | ||
i686-unknown-linux-gnu, | ||
i686-unknown-linux-musl, | ||
x86_64-unknown-linux-gnu, | ||
x86_64-unknown-linux-musl, | ||
] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Install rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
target: ${{ matrix.target }} | ||
|
||
- name: Build target | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
use-cross: true | ||
command: build | ||
args: --release --target ${{ matrix.target }} | ||
- name: Package | ||
shell: bash | ||
run: | | ||
cd target/${{ matrix.target }}/release | ||
tar czvf ../../../pattrick-${{ matrix.target }}.tar.gz pattrick | ||
cd - | ||
- name: 'Get Previous tag' | ||
id: previoustag | ||
uses: "WyriHaximus/github-action-get-previous-tag@v1" | ||
with: | ||
fallback: 1.0.0 | ||
- name: Publish | ||
uses: softprops/action-gh-release@v1 | ||
# TODO: if any of the build step fails, the release should be deleted. | ||
with: | ||
files: 'pattrick*' | ||
tag_name: ${{ steps.previoustag.outputs.tag }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
release-mac: | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
target: [aarch64-apple-darwin, x86_64-apple-darwin] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Install rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
target: ${{ matrix.target }} | ||
|
||
- name: Build target | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
use-cross: true | ||
command: build | ||
args: --release --target ${{ matrix.target }} | ||
- name: Package | ||
shell: bash | ||
run: | | ||
cd target/${{ matrix.target }}/release | ||
tar czvf ../../../pattrick-${{ matrix.target }}.tar.gz pattrick | ||
cd - | ||
- name: 'Get Previous tag' | ||
id: previoustag | ||
uses: "WyriHaximus/github-action-get-previous-tag@v1" | ||
with: | ||
fallback: 1.0.0 | ||
- name: Publish | ||
uses: softprops/action-gh-release@v1 | ||
# TODO: if any of the build step fails, the release should be deleted. | ||
with: | ||
files: 'pattrick*' | ||
tag_name: ${{ steps.previoustag.outputs.tag }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters