Skip to content

Commit

Permalink
**Automated nightly release 80**
Browse files Browse the repository at this point in the history
commit 5e948cf
Author: Emma <[email protected]>

Slightly adjust release workflow version

commit f6ad47c
Author: Emma <[email protected]>

🔧Adjust build script to append environment to applicationId

commit abb4f0a
Author: Emma <[email protected]>

🛠 Set version code explicitly

...

**Full Changelog**: 0.18.0-nightly-79...0.18.0-nightly-80
  • Loading branch information
MarmadileManteater committed Jan 15, 2023
2 parents 9bfdfbd + 5e948cf commit 1ada613
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/buildCordova.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ jobs:
id: versionNumber
uses: actions/github-script@v6
env:
VERSION_NUMBER_DEVELOPMENT: ${{ env.PACKAGE_VERSION }}-development-${{ github.run_number }}
VERSION_NUMBER_DEVELOPMENT: ${{ env.PACKAGE_VERSION }}.${{ github.run_number }}
with:
result-encoding: string
script: |
return "${{ env.VERSION_NUMBER_DEVELOPMENT }}"
return "${{ env.VERSION_NUMBER_DEVELOPMENT }}-development"
- name: Update package.json version
uses: jossef/action-set-json-field@v2
with:
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Build APK with Cordova with Node.js ${{ matrix.node-version}}
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64')
run: npm run build:cordova freetube-${{ steps.versionNumber.outputs.result }}.apk cordova ./freetube.keystore ${{ secrets.KEYSTORE_PASSWORD }}

- name: Upload Cordova APK Artifact
uses: actions/upload-artifact@v3
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64')
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/releaseCordova.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
env:
IS_DEV: ${{ contains(github.ref, 'development') }}
IS_NIGHTLY: ${{ contains(github.ref, 'release') }}
VERSION_NUMBER_DEVELOPMENT: ${{ env.PACKAGE_VERSION }}-development-${{ github.run_number }}
VERSION_NUMBER_NIGHTLY: ${{ env.PACKAGE_VERSION }}-nightly-${{ github.run_number }}
VERSION_NUMBER_RELEASE: ${{ env.PACKAGE_VERSION }}-unofficial
VERSION_NUMBER_DEVELOPMENT: ${{ env.PACKAGE_VERSION }}.${{ github.run_number }}-development
VERSION_NUMBER_NIGHTLY: ${{ env.PACKAGE_VERSION }}.${{ github.run_number }}
VERSION_NUMBER_RELEASE: ${{ env.PACKAGE_VERSION }}.${{ github.run_number }}
with:
result-encoding: string
script: |
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
with:
name: freetube-${{ steps.versionNumber.outputs.result }}.zip
path: build/freetube/freetube-${{ steps.versionNumber.outputs.result }}.zip

- name: Create release body
run: |
echo "${{ github.event.head_commit.message }}" >> release.txt
Expand Down
10 changes: 9 additions & 1 deletion _scripts/cordova-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,15 @@ const archiver = require('archiver');
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
<preference name="AllowInlineMediaPlayback" value="true"/>`
const configXML = await parseXMLString(await fsReadFile(path.join(distDirectory, 'config.xml')))
configXML.widget.$.id = 'io.freetubeapp.' + sourcePackage.name
configXML.widget.$.id = `io.freetubeapp.${sourcePackage.name}`
configXML.widget.$.version = sourcePackage.version
const sourcePackageParts = sourcePackage.version.split('-')
const [major, minor, patch, build] = sourcePackageParts[0].split('.')
// Seperate environments by ID instead of version code
if (sourcePackageParts.length > 1) {
configXML.widget.$.id += `.${sourcePackageParts[1]}`
}
configXML.widget.$['android-versionCode'] = `${major * 10000000 + minor * 100000 + patch * 1000 + build}`
configXML.widget.author[0].$.email = sourcePackage.author.email
configXML.widget.author[0]._ = sourcePackage.author.name
configXML.widget.author[0].$.href = sourcePackage.author.url
Expand Down Expand Up @@ -482,6 +489,7 @@ const archiver = require('archiver');
await fsWriteFile(path.join(buildDirectory, apkName, 'manifest.webmanifest'), JSON.stringify(manifest, null, 2))
}
} catch (exception) {
const g = 'see not useless'
throw exception
}
}())

0 comments on commit 1ada613

Please sign in to comment.