Skip to content

ci: change to tag based changelog generation #25

ci: change to tag based changelog generation

ci: change to tag based changelog generation #25

name: Release and build on tag
on:
push:
tags:
- v*
jobs:
build-ubuntu:
name: "Build web, android, & linux"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# Setup Repo
- name: Checkout
uses: actions/checkout@v2
# Create tag based changelog
- name: Create changelog text
id: changelog
uses: loopwerk/tag-changelog@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
exclude_types: other,ci
# Get the dependencies going
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: 17
distribution: "temurin"
# And begin the flutter
- name: Install dependencies
run: flutter pub get
# Build web
- name: Build Web
run: flutter build web --web-renderer html
# Create a zip file for the web build
- name: Create web build zip
run: |
sudo apt-get install -y zip
zip -r vup-chat-web.zip build/web
# Build linux
- name: Build Linux
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev libnotify-dev
flutter build linux
cd build/linux/x64/release
zip -r ../../../../vup-chat-linux.zip bundle/
cd ../../../..
# Bulid android SIGNED
- name: 🔧 Build APK
env:
KEY_JKS: ${{ secrets.KEY_JKS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
ALIAS_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: |
base64 -d <<< $KEY_JKS > ./android/app/release-key.jks
./flutterw build apk --release -v
mkdir -p ./outputs
cp build/app/outputs/apk/release/*.apk ./outputs/
# Create release
- name: Create Release
uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
# Now upload those assets
- name: Upload release assets
uses: alexellis/upload-assets@0.4.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_paths: '["./vup-chat-web.zip", "./outputs/*", "vup-chat-linux.zip"]'
# TODO: Add Windows build
# TODO: Add MacOS & iOS bilds