Create releases #29
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: Create releases | |
on: | |
# https://github.com/orgs/community/discussions/27028#discussioncomment-3254360 | |
workflow_dispatch: | |
jobs: | |
release-linux: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # https://github.com/marketplace/actions/get-latest-tag | |
- uses: subosito/flutter-action@v2 # https://github.com/marketplace/actions/flutter-action | |
with: | |
channel: 'stable' # or: 'beta', 'dev' or 'master' | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Install build dependencies | |
run: sudo apt install -y ninja-build libgtk-3-dev | |
- run: flutter doctor | |
- name: Get tag for release | |
id: currentTag | |
uses: WyriHaximus/github-action-get-previous-tag@v1 # https://github.com/marketplace/actions/get-latest-tag | |
- name: Build release linux | |
run: flutter build linux --release | |
- name: Copy script files | |
run: | | |
cp -R script build/linux/x64/release/bundle/script | |
- name: Zip release linux | |
run: | | |
mv build/linux/x64/release/bundle DeepFaceLabClient-linux | |
zip -r DeepFaceLabClient-linux-${{ steps.currentTag.outputs.tag }}.zip DeepFaceLabClient-linux | |
- name: Extract release notes # https://github.com/marketplace/actions/extract-release-notes | |
id: extract-release-notes | |
uses: ffurrer2/extract-release-notes@v1 | |
- uses: ncipollo/release-action@v1 # https://github.com/marketplace/actions/create-release | |
with: | |
artifacts: DeepFaceLabClient-linux-${{ steps.currentTag.outputs.tag }}.zip | |
tag: ${{ steps.currentTag.outputs.tag }} | |
name: DeepFaceLabClient-${{ steps.currentTag.outputs.tag }} | |
allowUpdates: true | |
body: ${{ steps.extract-release-notes.outputs.release_notes }} | |
release-windows: | |
runs-on: windows-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # https://github.com/marketplace/actions/get-latest-tag | |
- uses: subosito/flutter-action@v2 # https://github.com/marketplace/actions/flutter-action | |
with: | |
channel: 'stable' # or: 'beta', 'dev' or 'master' | |
- name: Install dependencies | |
run: flutter pub get | |
- run: flutter doctor | |
- name: Get tag for release | |
id: currentTag | |
uses: WyriHaximus/github-action-get-previous-tag@v1 # https://github.com/marketplace/actions/get-latest-tag | |
- name: Build release windows | |
run: flutter build windows --release | |
- name: Copy dll files | |
run: | | |
copy .\requirements\windows\msvcp140.dll build\windows\runner\Release | |
copy .\requirements\windows\vcruntime140.dll build\windows\runner\Release | |
copy .\requirements\windows\vcruntime140_1.dll build\windows\runner\Release | |
- name: Copy script files | |
run: | | |
mkdir .\build\windows\runner\Release\script\ | |
xcopy .\script\ .\build\windows\runner\Release\script\ /e | |
- name: Zip release windows | |
run: | | |
move build/windows/runner/Release DeepFaceLabClient-windows | |
7z a -r DeepFaceLabClient-windows-${{ steps.currentTag.outputs.tag }}.zip DeepFaceLabClient-windows | |
- name: Extract release notes # https://github.com/marketplace/actions/extract-release-notes | |
id: extract-release-notes | |
uses: ffurrer2/extract-release-notes@v1 | |
- uses: ncipollo/release-action@v1 # https://github.com/marketplace/actions/create-release | |
with: | |
artifacts: DeepFaceLabClient-windows-${{ steps.currentTag.outputs.tag }}.zip | |
tag: ${{ steps.currentTag.outputs.tag }} | |
name: DeepFaceLabClient-${{ steps.currentTag.outputs.tag }} | |
allowUpdates: true | |
body: ${{ steps.extract-release-notes.outputs.release_notes }} |