build: bump version to 0.3.3 #32
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
on: | |
push: | |
branches: [main] | |
name: flatpak CI | |
jobs: | |
flatpak: | |
name: "Flatpak" | |
runs-on: ubuntu-latest | |
outputs: | |
output1: ${{ steps.version.outputs.version }} | |
container: | |
image: bilelmoussaoui/flatpak-github-actions:gnome-44 | |
options: --privileged | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Create version | |
id: version | |
run: echo "version=v$(grep ^version pubspec.yaml |cut -f 2 -d ' '|cut -f 1 -d '+')" >> $GITHUB_OUTPUT | |
- name: Get HEAD short sha | |
id: short_sha | |
run: echo "short_sha=$(echo ${{ github.sha }}|head -c 7)" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: set HEAD git short sha in config.dart | |
run: sed -i "/commit/s/HEAD/${{ steps.short_sha.outputs.short_sha }}/" lib/config.dart | |
shell: bash | |
- name: Install missing package to build with flutter | |
run: sudo dnf install -y ninja-build gtk3-devel cmake clang jq curl pkgconf mpv-devel mpv-libs mpv | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel : 'stable' | |
cache: true | |
- name: Trust flutter git repo | |
run: git config --global --add safe.directory /opt/hostedtoolcache/flutter/stable-* | |
- run: flutter pub get | |
#- run: flutter test | |
- run: flutter config --enable-linux-desktop | |
- run: flutter build linux --release | |
- run: rm -rf flatpak/flarte | |
- run: mv build/linux/x64/release/bundle/ flatpak/flarte | |
- name: Install missing nodejs and other packages [for act run] | |
if: ${{ env.ACT }} | |
run: sudo dnf install -y nodejs tar zstd | |
- uses: flatpak/flatpak-github-actions/[email protected] | |
with: | |
bundle: flarte-${{ steps.version.outputs.version }}-x86_64.flatpak | |
manifest-path: flatpak/io.github.solsticedhiver.flarte.yml | |
cache-key: flatpak-builder-${{ github.sha }} | |
- name: Create a release in GitHub | |
if: ${{ !env.ACT }} | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifacts: "flarte-${{ steps.version.outputs.version }}-x86_64.flatpak" | |
token: "${{ secrets.GH_TOKEN }}" | |
tag: "${{ steps.version.outputs.version }}" | |
commit: "${{ github.sha }}" |