-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from soralis0912/master
ビルドの自動化
- Loading branch information
Showing
3 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
on: | ||
workflow_dispatch: | ||
branches-ignore: | ||
- '**' | ||
tags: | ||
- 'v*' | ||
create: | ||
branches-ignore: | ||
- '**' | ||
tags: | ||
- 'v*' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
- name: Build with Gradle | ||
run: | | ||
if [[ -n "${{ secrets.KEYSTORE_BASE64 }}" ]]; then | ||
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > release.keystore | ||
export KEYSTORE_PASSWORD="${{ secrets.KEYSTORE_PASSWORD }}" | ||
export KEY_ALIAS="${{ secrets.KEY_ALIAS }}" | ||
export KEY_PASSWORD="${{ secrets.KEY_PASSWORD }}" | ||
fi | ||
./gradlew assembleRelease | ||
- name: Get apk path | ||
id: apk-path | ||
run: | | ||
path=$(find **/build/outputs/apk -name '*.apk' -type f | head -1) | ||
echo "::set-output name=path::$path" | ||
- name: Upload apk file | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: apk | ||
path: ${{ steps.apk-path.outputs.path }} | ||
- name: Upload Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
allowUpdates: true | ||
artifacts: ${{ steps.apk-path.outputs.path }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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