短くする #6
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-workflow | |
on: | |
push: | |
paths-ignore: | |
- "doc/**" | |
- "**.md" | |
- "LICENSE" | |
- "NOTICE" | |
jobs: | |
build-unix: | |
strategy: | |
fail-fast: false | |
matrix: | |
m: | |
- name: macos_arm64 | |
runs-on: macos-13 | |
- name: ubuntu-20.04_x86_64 | |
runs-on: ubuntu-20.04 | |
- name: ubuntu-22.04_x86_64 | |
runs-on: ubuntu-22.04 | |
name: Build sora-c-sdk for ${{ matrix.m.name }} | |
runs-on: ${{ matrix.m.runs-on }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
sudo apt-get update | |
sudo apt-get install -y libpulse-dev | |
- run: python3 run.py --sumomo --package ${{ matrix.m.name }} | |
- name: Get package name | |
run: | | |
source _package/${{ matrix.m.name }}/release/sorac.env | |
echo "name=${PACKAGE_NAME}" >> $GITHUB_OUTPUT | |
id: package_name | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.package_name.outputs.name }} | |
path: _package/${{ matrix.m.name }}/release/${{ steps.package_name.outputs.name }} | |
- name: Upload Environment | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.m.name }}.env | |
path: _package/${{ matrix.m.name }}/release/sorac.env | |
create-release: | |
name: Create Release | |
if: contains(github.ref, 'tags/202') | |
needs: | |
- build-unix | |
runs-on: ubuntu-latest | |
steps: | |
- uses: ./.github/actions/download | |
with: | |
platform: macos_arm64 | |
- uses: ./.github/actions/download | |
with: | |
platform: ubuntu-20.04_x86_64 | |
- uses: ./.github/actions/download | |
with: | |
platform: ubuntu-22.04_x86_64 | |
- uses: ./.github/actions/download | |
with: | |
platform: android | |
- name: Env to output | |
run: | | |
echo "package_paths<<EOF" >> $GITHUB_OUTPUT | |
cat package_paths.env >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
id: env | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ${{ steps.env.outputs.package_paths }} |