2021-09-26 14:42:50 +02:00
|
|
|
name: build
|
2021-02-14 22:19:38 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-09-25 23:46:53 +02:00
|
|
|
branches:
|
|
|
|
- main
|
2021-02-14 22:19:38 +01:00
|
|
|
pull_request:
|
2021-09-25 23:46:53 +02:00
|
|
|
branches:
|
|
|
|
- main
|
2021-02-14 22:19:38 +01:00
|
|
|
release:
|
2021-09-25 23:46:53 +02:00
|
|
|
types:
|
|
|
|
- created
|
2021-02-14 22:19:38 +01:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
2022-05-15 15:47:12 +02:00
|
|
|
|
|
|
|
- name: Prepare Lattice Diamond license
|
|
|
|
env:
|
|
|
|
ENCODED_LICENSE: ${{ secrets.LATTICE_DIAMOND_LICENSE }}
|
|
|
|
run: |
|
|
|
|
mkdir -p ./flexlm
|
|
|
|
echo "$ENCODED_LICENSE" > ./flexlm/encoded_license
|
|
|
|
base64 -d ./flexlm/encoded_license > ./flexlm/license.dat
|
2021-02-14 22:19:38 +01:00
|
|
|
|
|
|
|
- name: Build script
|
2022-05-15 15:47:12 +02:00
|
|
|
env:
|
|
|
|
MAC_ADDRESS: ${{ secrets.LATTICE_DIAMOND_MAC }}
|
2021-11-16 22:37:48 +01:00
|
|
|
run: ./docker_build.sh release --force-clean
|
2021-02-14 22:19:38 +01:00
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-05-15 18:02:02 +02:00
|
|
|
name: SC64
|
|
|
|
path: SC64.zip
|
2021-02-14 22:19:38 +01:00
|
|
|
|
|
|
|
- name: Get release
|
|
|
|
if: github.event_name == 'release' && github.event.action == 'created'
|
|
|
|
id: get_release
|
|
|
|
uses: bruceadams/get-release@v1.2.2
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
|
|
|
|
|
|
- name: Upload release asset
|
|
|
|
if: github.event_name == 'release' && github.event.action == 'created'
|
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
2022-05-15 18:02:02 +02:00
|
|
|
asset_path: SC64.zip
|
|
|
|
asset_name: SC64.zip
|
2021-02-14 22:19:38 +01:00
|
|
|
asset_content_type: application/zip
|