Skip to content

cd: add checkout step to the ref release step #43

cd: add checkout step to the ref release step

cd: add checkout step to the ref release step #43

Workflow file for this run

name: cd
on: [push]
jobs:
build-ubuntu:
strategy:
fail-fast: false
matrix:
lang:
- bash
- c
# - cpp # FIXME: `lang` needs to handle things differently maybe because it won't generate for this
- embedded-template
- html
- java
- javascript
- json
- python
- ruby
- rust
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 ${{ matrix.lang }} for ${{ matrix.target.platform }}
env:
PLATFORM: ${{ matrix.target.platform }}
run: |
./lang d ${{ matrix.lang }}
# docker run --rm -v $(pwd):/workdir -e CROSS_TRIPLE=${{ matrix.target.triplet }} -e PLATFORM=${{ matrix.target.platform }} multiarch/crossbuild ./lang d ${{ matrix.lang }}
- 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
matrix:
lang:
- bash
- c
# - cpp
- embedded-template
- html
- java
- javascript
- json
- python
- ruby
- rust
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Build ${{ matrix.lang }} for macos
env:
PLATFORM: "macos-x64"
run: |
./lang d ${{ matrix.lang }}
- 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: 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 }}