fix again #137
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
name: BuildReleaseApk | |
on: [push, pull_request] | |
jobs: | |
buildReleaseApk: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: "0" | |
- name: Specify node version | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Use npm caches | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- name: Use specific Java version for sdkmanager to work | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
cache: 'gradle' | |
- name: Install node_modules | |
run: npm install --production | |
- name: show commit of latest tag | |
run: | | |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`) | |
LATEST_TAG2=$(git tag | sort --version-sort | tail -n1) | |
LATEST_TAG3=$(git tag | sort | tail -n 1) | |
echo $LATEST_TAG | |
echo $LATEST_TAG2 | |
echo $LATEST_TAG3 | |
#- name: Create release-notes.txt | |
# run: git log --pretty=format:'* %s %b' $GITHUB_SHA | grep -v "Merge branch 'master'" | grep -v "Merge remote-tracking branch 'origin/master'" | grep -v "Merge pull request" | awk -F 'review completed for the source file' '{print $1;}' | grep -E -v 'on the(.*)language.' | awk -F 'Snyk has created this PR' '{print $1;}' | grep -E -v 'See this package in npm|https://www.npmjs.com/|See this project in Snyk|https://app.snyk.io' | awk '!/^$/' > release-notes.txt | |
#- name: Create release-notes.json | |
# run: node -e 'console.log(JSON.stringify(require("fs").readFileSync("release-notes.txt", "utf8")));' > release-notes.json | |
- name: Build | |
env: | |
KEYSTORE_FILE_BASE64: ${{ secrets.KEYSTORE_FILE_BASE64 }} | |
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
run: ./scripts/build-release-apk.sh | |
- uses: actions/upload-artifact@v3 | |
if: success() | |
with: | |
name: apk | |
path: ./android/app/build/outputs/apk/release/app-release.apk |