mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 04:32:32 +00:00
chore: use Git commit message as changelog for edge releases
This commit is contained in:
38
.github/workflows/prepare.yml
vendored
38
.github/workflows/prepare.yml
vendored
@@ -8,6 +8,9 @@ on:
|
||||
required: true
|
||||
|
||||
outputs:
|
||||
build-changelog:
|
||||
description: "Build Changelog"
|
||||
value: ${{ jobs.build-details.outputs.build-changelog }}
|
||||
build-number:
|
||||
description: "Build Number"
|
||||
value: ${{ jobs.build-details.outputs.build-number }}
|
||||
@@ -164,16 +167,36 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Count Commits
|
||||
id: commit_count
|
||||
id: commit-count
|
||||
run: |
|
||||
COUNT=`git rev-list HEAD --count`
|
||||
echo "::set-output name=commit_count::$COUNT"
|
||||
echo "::set-output name=commit-count::$COUNT"
|
||||
|
||||
- name: Latest Commit Message
|
||||
id: commit-message
|
||||
run: |
|
||||
MESSAGE=`git show -s --format=%s`
|
||||
echo "::set-output name=commit-message::$MESSAGE"
|
||||
|
||||
- name: Build Changelog
|
||||
id: build-changelog
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
FLAVOR: ${{ inputs.flavor }}
|
||||
MESSAGE: ${{ steps.commit-message.outputs.commit-message }}
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const defaultMessage = 'Thank you for testing pre-release builds of LunaSea! Please consider joining the Discord to give feedback to the developer.\n\nChanges can be found on GitHub or by going to settings/system!';
|
||||
const isEdge = process.env.FLAVOR === 'edge';
|
||||
if (isEdge) return process.env.MESSAGE ?? defaultMessage;
|
||||
return defaultMessage;
|
||||
|
||||
- name: Build Number
|
||||
id: build-number
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
COUNT: ${{ steps.commit_count.outputs.commit_count }}
|
||||
COUNT: ${{ steps.commit-count.outputs.commit-count }}
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
@@ -194,10 +217,12 @@ jobs:
|
||||
|
||||
- name: Log Build Details
|
||||
env:
|
||||
changelog: ${{ steps.build-changelog.outputs.result }}
|
||||
number: ${{ steps.build-number.outputs.result }}
|
||||
title: ${{ steps.build-title.outputs.output }}
|
||||
version: ${{ steps.build-version.outputs.current-version }}
|
||||
run: |
|
||||
echo "Build Changelog: $changelog"
|
||||
echo "Build Number: $number"
|
||||
echo "Build Title: $title"
|
||||
echo "Build Version: $version"
|
||||
@@ -226,12 +251,17 @@ jobs:
|
||||
|
||||
- name: Generate Build Runner Files
|
||||
run: flutter packages pub run build_runner build
|
||||
|
||||
|
||||
- name: Generate Changelog
|
||||
run: |
|
||||
echo ${{ needs.build-details.outputs.build-changelog }} > ${{ github.workspace }}/android/fastlane/metadata/android/en-CA/changelogs/default.txt
|
||||
|
||||
- name: Upload Core Files
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: core-files
|
||||
path: |
|
||||
${{ github.workspace }}/android/fastlane/metadata/android/en-CA/changelogs/default.txt
|
||||
${{ github.workspace }}/assets/localization
|
||||
${{ github.workspace }}/lib/**/*.g.dart
|
||||
${{ github.workspace }}/lib/system/environment.dart
|
||||
|
||||
5
.github/workflows/publish_ios.yml
vendored
5
.github/workflows/publish_ios.yml
vendored
@@ -3,6 +3,9 @@ name: Publish iOS
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
build-changelog:
|
||||
required: true
|
||||
type: string
|
||||
build-number:
|
||||
required: true
|
||||
type: string
|
||||
@@ -63,7 +66,7 @@ jobs:
|
||||
APPLE_STORE_CONNECT_KEY_FILEPATH: ${{ github.workspace }}/keys/appstore.p8
|
||||
APPLE_STORE_CONNECT_KEY_ID: ${{ secrets.APPLE_STORE_CONNECT_KEY_ID }}
|
||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||
run: bundle exec fastlane deploy_appstore groups:${{ inputs.flavor }} ipa:${{ github.workspace }}/output/lunasea-ios.ipa
|
||||
run: bundle exec fastlane deploy_appstore groups:${{ inputs.flavor }} changelog:${{ inputs.build-changelog }} ipa:${{ github.workspace }}/output/lunasea-ios.ipa
|
||||
|
||||
s3:
|
||||
name: S3
|
||||
|
||||
5
.github/workflows/publish_macos.yml
vendored
5
.github/workflows/publish_macos.yml
vendored
@@ -3,6 +3,9 @@ name: Publish macOS
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
build-changelog:
|
||||
required: true
|
||||
type: string
|
||||
build-number:
|
||||
required: true
|
||||
type: string
|
||||
@@ -63,7 +66,7 @@ jobs:
|
||||
APPLE_STORE_CONNECT_KEY_FILEPATH: ${{ github.workspace }}/keys/appstore.p8
|
||||
APPLE_STORE_CONNECT_KEY_ID: ${{ secrets.APPLE_STORE_CONNECT_KEY_ID }}
|
||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||
run: bundle exec fastlane deploy_appstore groups:${{ inputs.flavor }} pkg:${{ github.workspace }}/output/lunasea-macos-amd64.pkg
|
||||
run: bundle exec fastlane deploy_appstore groups:${{ inputs.flavor }} changelog:${{ inputs.build-changelog }} pkg:${{ github.workspace }}/output/lunasea-macos-amd64.pkg
|
||||
|
||||
s3:
|
||||
name: S3
|
||||
|
||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -136,6 +136,7 @@ jobs:
|
||||
uses: JagandeepBrar/LunaSea/.github/workflows/publish_ios.yml@master
|
||||
with:
|
||||
flavor: ${{ inputs.flavor || 'edge' }}
|
||||
build-changelog: ${{ needs.prepare.outputs.build-changelog }}
|
||||
build-number: ${{ needs.prepare.outputs.build-number }}
|
||||
build-title: ${{ needs.prepare.outputs.build-title }}
|
||||
secrets:
|
||||
@@ -173,6 +174,7 @@ jobs:
|
||||
uses: JagandeepBrar/LunaSea/.github/workflows/publish_macos.yml@master
|
||||
with:
|
||||
flavor: ${{ inputs.flavor || 'edge' }}
|
||||
build-changelog: ${{ needs.prepare.outputs.build-changelog }}
|
||||
build-number: ${{ needs.prepare.outputs.build-number }}
|
||||
build-title: ${{ needs.prepare.outputs.build-title }}
|
||||
secrets:
|
||||
|
||||
@@ -81,7 +81,7 @@ platform :ios do
|
||||
connect_appstore_connect
|
||||
|
||||
upload_to_testflight(
|
||||
changelog: "Thank you for testing pre-release builds of LunaSea! Please consider joining the Discord to give feedback to the developer.\n\nChanges can be found on GitHub or by going to settings/system and tapping on the version tile!",
|
||||
changelog: options[:changelog],
|
||||
distribute_external: true,
|
||||
groups: options[:groups],
|
||||
ipa: options[:ipa],
|
||||
|
||||
@@ -162,7 +162,7 @@ platform :mac do
|
||||
connect_appstore_connect
|
||||
|
||||
upload_to_testflight(
|
||||
changelog: "Thank you for testing pre-release builds of LunaSea! Please consider joining the Discord to give feedback to the developer.\n\nChanges can be found on GitHub or by going to settings/system and tapping on the version tile!",
|
||||
changelog: options[:changelog],
|
||||
distribute_external: true,
|
||||
groups: options[:groups],
|
||||
pkg: options[:pkg],
|
||||
|
||||
Reference in New Issue
Block a user