mirror of
https://github.com/pstrueb/piper.git
synced 2026-04-17 22:05:30 +00:00
Try multi-arch Linux build
This commit is contained in:
83
.github/workflows/main.yml
vendored
83
.github/workflows/main.yml
vendored
@@ -3,53 +3,64 @@ name: main
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
tags:
|
||||||
- master
|
- "*"
|
||||||
# push:
|
|
||||||
# tags:
|
|
||||||
# - "*"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# create_release:
|
create_release:
|
||||||
# name: Create release
|
name: Create release
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# outputs:
|
outputs:
|
||||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
# steps:
|
steps:
|
||||||
# - name: Create release
|
- name: Create release
|
||||||
# id: create_release
|
id: create_release
|
||||||
# uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
# env:
|
env:
|
||||||
# GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
# with:
|
with:
|
||||||
# tag_name: ${{ github.ref }}
|
tag_name: ${{ github.ref }}
|
||||||
# release_name: ${{ github.ref }}
|
release_name: ${{ github.ref }}
|
||||||
# draft: false
|
draft: false
|
||||||
# prerelease: false
|
prerelease: false
|
||||||
build_linux:
|
build_linux:
|
||||||
name: "linux build"
|
name: "linux build"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# needs: create_release # we need to know the upload URL
|
needs: create_release # we need to know the upload URL
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: docker/setup-qemu-action@v2
|
- uses: docker/setup-qemu-action@v2
|
||||||
- uses: docker/setup-buildx-action@v2
|
- uses: docker/setup-buildx-action@v2
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
docker buildx build . --platform linux/arm64 --output 'type=local,dest=dist'
|
docker buildx build . --platform linux/amd64,linux/arm64,linux/arm/v7 --output 'type=local,dest=dist'
|
||||||
# - name: package
|
- name: upload-amd64
|
||||||
# run: |
|
uses: actions/upload-release-asset@v1
|
||||||
# cd _install && \
|
env:
|
||||||
# tar -czf piper_linux_${{ matrix.arch }}.tar.gz piper/
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
# - name: upload
|
with:
|
||||||
# uses: actions/upload-release-asset@v1
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
# env:
|
asset_path: dist/piper_amd64.tar.gz
|
||||||
# GITHUB_TOKEN: ${{ github.token }}
|
asset_name: piper_linux_x86_64.tar.gz
|
||||||
# with:
|
asset_content_type: application/octet-stream
|
||||||
# upload_url: ${{ needs.create_release.outputs.upload_url }}
|
- name: upload-arm64
|
||||||
# asset_path: _install/piper_linux_${{ matrix.arch }}.tar.gz
|
uses: actions/upload-release-asset@v1
|
||||||
# asset_name: piper_linux_${{ matrix.arch }}.tar.gz
|
env:
|
||||||
# asset_content_type: application/octet-stream
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
|
asset_path: dist/piper_arm64.tar.gz
|
||||||
|
asset_name: piper_linux_aarch64.tar.gz
|
||||||
|
asset_content_type: application/octet-stream
|
||||||
|
- name: upload-armv7
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
|
asset_path: dist/piper_armv7.tar.gz
|
||||||
|
asset_name: piper_linux_armv7l.tar.gz
|
||||||
|
asset_content_type: application/octet-stream
|
||||||
# build_windows:
|
# build_windows:
|
||||||
# runs-on: windows-latest
|
# runs-on: windows-latest
|
||||||
# name: "windows build: ${{ matrix.arch }}"
|
# name: "windows build: ${{ matrix.arch }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user