ci: bundle after the release action maybe? #58
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
name: cd | |
on: [push] | |
jobs: | |
build-ubuntu: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
# - { platform: linux-arm, triplet: arm-linux-gnueabi } | |
# - { platform: linux-arm64, triplet: aarch64-linux-gnu } | |
- { platform: linux-x64, triplet: x86_64-linux-gnu } | |
# NOTE: | |
# Now that we depend in tree-sitter-cli to regenerate the pulled parser | |
# all these platform doesn't make any sense. They're simply unsupported | |
# in the releases of tree-sitter. | |
# - arm-linux-gnueabihf | |
# - aarch64-linux-gnu | |
# - mipsel-linux-gnu | |
# - powerpc64le-linux-gnu | |
# | |
# FIXME: tree-sitter has a known (by me) bug by now: | |
# ld: unknown option -soname | |
# It should be patched to support | |
# - x86_64-apple-darwin | |
# - x86_64h-apple-darwin | |
# - i386-apple-darwin | |
# | |
# NOTE: Tese are supported by multiarch/crossbuild but not tree-sitter | |
# - x86_64-w64-mingw32 | |
# - i686-w64-mingw32 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build for ${{ matrix.target.platform }} | |
env: | |
PLATFORM: ${{ matrix.target.platform }} | |
run: | | |
./lang d bash c embedded-template html java javascript json python ruby rust | |
- name: Prepare git # To get tags from `git describe` | |
run: git fetch --prune --unshallow | |
- name: Bundle all parsers | |
run: | | |
./package/deb | |
./package/zip | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.vars.outputs.sha_short }} | |
name: Release ${{ github.ref }}-${{ steps.vars.outputs.sha_short }} | |
draft: true | |
files: | | |
./lib/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-macos: | |
strategy: | |
fail-fast: false | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build for macos | |
env: | |
PLATFORM: "macos-arm64" | |
run: | | |
./lang d bash c embedded-template html java javascript json python ruby rust | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.vars.outputs.sha_short }} | |
name: Release ${{ github.ref }}-${{ steps.vars.outputs.sha_short }} | |
draft: true | |
files: | | |
./lib/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
release-fixed-assets: | |
needs: [build-ubuntu, build-macos] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Prepare git # To get tags from `git describe` | |
run: git fetch --prune --unshallow | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.vars.outputs.sha_short }} | |
name: Release ${{ github.ref }}-${{ steps.vars.outputs.sha_short }} | |
draft: true | |
files: ref | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: list everything local | |
run: | | |
apt update -y | |
apt install tree -y | |
tree . |