Build linux alpine target for release #39
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: 'Build linux alpine target for release' | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version to release ( ex: v0.0.1 )' | |
required: true | |
env: | |
node-version: 14.x | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: docker-practice/actions-setup-docker@master | |
with: | |
docker_version: "20.10" | |
docker_channel: stable | |
- name: Build madlib | |
run: DOCKER_BUILDKIT=1 docker build -f ".github/workflows/Dockerfile-x86_64-alpine" -o . . | |
- name: Bundle alpine archive | |
run: | | |
mkdir madlib-x86_64-alpine-linux-musl | |
cp ./madlib ./madlib-x86_64-alpine-linux-musl/ | |
cp -R runtime ./madlib-x86_64-alpine-linux-musl/ | |
cp -R prelude ./madlib-x86_64-alpine-linux-musl/ | |
cp ./package-installer.js ./madlib-x86_64-alpine-linux-musl/ | |
tar -czvf madlib-x86_64-alpine-linux-musl.tar.gz madlib-x86_64-alpine-linux-musl | |
- uses: pdamianik/release-tag-to-upload-url-action@v1.0.1 | |
id: release_upload_url | |
with: | |
tag: ${{ github.event.inputs.version }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload alpine build | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.release_upload_url.outputs.uploadUrl }} | |
asset_path: ./madlib-x86_64-alpine-linux-musl.tar.gz | |
asset_name: madlib-x86_64-alpine-linux-musl.tar.gz | |
asset_content_type: application/tar+gzip |