Merge remote-tracking branch 'origin/main' into dev

This commit is contained in:
Imran Remtulla
2024-01-14 01:36:43 -05:00

View File

@@ -6,8 +6,6 @@ on:
beta: beta:
type: boolean type: boolean
description: Is beta? description: Is beta?
environment:
type: environment
jobs: jobs:
build: build:
@@ -25,6 +23,18 @@ jobs:
gpg_private_key: ${{ secrets.PGP_KEY_BASE64 }} gpg_private_key: ${{ secrets.PGP_KEY_BASE64 }}
passphrase: ${{ secrets.PGP_PASSPHRASE }} passphrase: ${{ secrets.PGP_PASSPHRASE }}
- name: Extract Version
id: extract_version
run: |
VERSION=$(grep -oP "^version: [^\+]+" pubspec.yaml | tail -c +10)
echo "version=$VERSION" >> $GITHUB_OUTPUT
if [ ${{ inputs.beta }} == true ]; then BETA=true; else BETA=false; fi
echo "beta=$BETA" >> $GITHUB_OUTPUT
TAG="v$VERSION"
if [ $BETA == true ]; then TAG="$TAG"-beta; fi
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "$VERSION" "$TAG" "$BETA"
- name: Build APKs - name: Build APKs
run: | run: |
sed -i 's/signingConfig signingConfigs.release//g' android/app/build.gradle sed -i 's/signingConfig signingConfigs.release//g' android/app/build.gradle
@@ -50,29 +60,18 @@ jobs:
rm apksign.keystore rm apksign.keystore
PGP_KEY_FINGERPRINT="${{ steps.import_pgp_key.outputs.fingerprint }}" PGP_KEY_FINGERPRINT="${{ steps.import_pgp_key.outputs.fingerprint }}"
- name: Extract Version # - name: Create Tag
id: extract_version # uses: mathieudutour/github-tag-action@v6.1
run: | # with:
VERSION=$(grep -oP "^version: [^\+]+" pubspec.yaml | tail -c +10) # github_token: ${{ secrets.GH_ACCESS_TOKEN }}
echo "version=$VERSION" >> $GITHUB_OUTPUT # custom_tag: "${{ steps.extract_version.outputs.tag }}"
if [ ${{ inputs.beta }} == true ]; then BETA=true; else BETA=false; fi # tag_prefix: ""
echo "beta=$BETA" >> $GITHUB_OUTPUT
TAG="v$VERSION"
if [ $BETA == true ]; then TAG="$TAG"-beta; fi
echo "tag=$TAG" >> $GITHUB_OUTPUT
- name: Create Tag # - name: Create Release And Upload APKs
uses: mathieudutour/github-tag-action@v6.1 # uses: ncipollo/release-action@v1
with: # with:
github_token: ${{ secrets.GH_ACCESS_TOKEN }} # token: ${{ secrets.GH_ACCESS_TOKEN }}
custom_tag: "${{ steps.extract_version.outputs.tag }}" # tag: "${{ steps.extract_version.outputs.tag }}"
tag_prefix: "" # prerelease: "${{ steps.extract_version.outputs.beta }}"
# artifacts: ./build/app/outputs/flutter-apk/*-release*.apk*
- name: Create Release And Upload APKs # generateReleaseNotes: true
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
tag: "${{ steps.extract_version.outputs.tag }}"
prerelease: "${{ steps.extract_version.outputs.beta }}"
artifacts: ./build/app/outputs/flutter-apk/*-release*.apk*
generateReleaseNotes: true