Skip to content

Commit

Permalink
ci(fix): build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hulxv committed Aug 29, 2023
1 parent 9f1353b commit 86ba278
Showing 1 changed file with 22 additions and 18 deletions.
40 changes: 22 additions & 18 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,20 @@ jobs:
- os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
deb: true

bin: prqlite

- os: ubuntu-20.04
target: aarch64-unknown-linux-gnu
deb: true

- os: windows-latest
target: x86_64-pc-windows-gnu
deb: false

- os: macos-latest
target: x86_64-apple-darwin
deb: false

steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down Expand Up @@ -72,7 +74,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --release --locked --target=${{ matrix.target }} --color=always --verbose
args: --release --target=${{ matrix.target }} --color=always --verbose
use-cross: ${{ runner.os == 'Linux' }}

- name: Install cargo-deb
Expand All @@ -87,26 +89,28 @@ jobs:
with:
command: deb
args: --no-build --no-strip --output=. --target=${{ matrix.target }}

- name: Package (*nix)
if: contains(matrix.platform.os, 'ubuntu')
run: >
echo "install -Dm755 ./prqlite /usr/bin" > "install.sh" &&
tar -cv
install.sh LICENSE README.md ./docs/
-C target/${{ matrix.target }}/release/ prqlite
| gzip --best
> 'prqlite-${{ steps.get_version.outputs.value }}-${{ matrix.target }}.tar.gz'
- name: Package as archive
shell: bash
run: |
cd target/${{ matrix.platform.target }}/release
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
7z a ../../../prqlite-${{ steps.get_version.outputs.value }}-${{ matrix.target }}.zip prqlite.exe
else
echo "install -Dm755 ./prqlite /usr/bin" > "install.sh" &&
tar -cv
install.sh LICENSE README.md
-C target/${{ matrix.target }}/release/ prqlite
| gzip --best
> 'prqlite-${{ steps.get_version.outputs.value }}-${{ matrix.target }}.tar.gz'
fi
cd -
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.target }}
path: |
*.exe
*.deb
*.tar.gz
*.zip
prqlite*
- name: Create release
uses: softprops/action-gh-release@v1
with:
Expand Down

0 comments on commit 86ba278

Please sign in to comment.