-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Leonardo Colman Lopes <[email protected]>
- Loading branch information
Showing
2 changed files
with
12 additions
and
26 deletions.
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 |
---|---|---|
|
@@ -16,8 +16,6 @@ import io.github.typesafegithub.workflows.actions.entrostat.GitSecretAction | |
import io.github.typesafegithub.workflows.actions.gradle.GradleBuildAction | ||
import io.github.typesafegithub.workflows.actions.ruby.SetupRuby | ||
import io.github.typesafegithub.workflows.actions.softprops.ActionGhRelease | ||
import io.github.typesafegithub.workflows.domain.Mode.Write | ||
import io.github.typesafegithub.workflows.domain.Permission.Contents | ||
import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest | ||
import io.github.typesafegithub.workflows.domain.triggers.WorkflowDispatch | ||
import io.github.typesafegithub.workflows.domain.triggers.WorkflowDispatch.Input | ||
|
@@ -51,17 +49,10 @@ workflow( | |
), | ||
sourceFile = __FILE__ | ||
) { | ||
job(id = "create-apk", runsOn = UbuntuLatest, permissions = mapOf(Contents to Write)) { | ||
run( | ||
name = "Set up Git Identity", | ||
command = """ | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "[email protected]" | ||
""".trimIndent() | ||
) | ||
job(id = "create-apk", runsOn = UbuntuLatest) { | ||
|
||
uses(name = "Set up JDK", action = SetupJava(javaVersion = "17", distribution = SetupJava.Distribution.Adopt)) | ||
uses(action = Checkout()) | ||
uses(action = Checkout(sshKey = expr { secrets["RELEASE_KEY"]!!})) | ||
uses(name = "reveal-secrets", action = GitSecretAction(gpgPrivateKey = expr { GPG_KEY })) | ||
|
||
val versionTypeExpr = expr { github["event.inputs.version_type"]!! } | ||
|
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 |
---|---|---|
|
@@ -34,38 +34,33 @@ jobs: | |
run: 'git diff --exit-code ''.github/workflows/release.yaml''' | ||
create-apk: | ||
runs-on: 'ubuntu-latest' | ||
permissions: | ||
contents: 'write' | ||
needs: | ||
- 'check_yaml_consistency' | ||
steps: | ||
- id: 'step-0' | ||
name: 'Set up Git Identity' | ||
run: |- | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "[email protected]" | ||
- id: 'step-1' | ||
name: 'Set up JDK' | ||
uses: 'actions/setup-java@v4' | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
- id: 'step-2' | ||
- id: 'step-1' | ||
uses: 'actions/checkout@v4' | ||
- id: 'step-3' | ||
with: | ||
ssh-key: '${{ secrets.RELEASE_KEY }}' | ||
- id: 'step-2' | ||
name: 'reveal-secrets' | ||
uses: 'entrostat/git-secret-action@v4' | ||
with: | ||
gpg-private-key: '${{ secrets.GPG_KEY }}' | ||
- id: 'step-4' | ||
- id: 'step-3' | ||
name: 'Run Bump Version Script' | ||
run: 'app/bump_version.main.kts ${{ github.event.inputs.version_type }} ${{ github.event.inputs.changelog }}' | ||
- id: 'step-5' | ||
- id: 'step-4' | ||
name: 'Create APK' | ||
uses: 'gradle/gradle-build-action@v3' | ||
with: | ||
arguments: 'assembleGithubRelease' | ||
- id: 'step-6' | ||
- id: 'step-5' | ||
name: 'Create release' | ||
uses: 'softprops/action-gh-release@v2' | ||
with: | ||
|
@@ -78,16 +73,16 @@ jobs: | |
app/build/outputs/mapping/githubRelease/configuration.txt | ||
app/build/outputs/mapping/githubRelease/seeds.txt | ||
app/build/outputs/mapping/githubRelease/usage.txt | ||
- id: 'step-7' | ||
- id: 'step-6' | ||
name: 'Create Bundle' | ||
uses: 'gradle/gradle-build-action@v3' | ||
with: | ||
arguments: 'clean bundlePlaystoreRelease' | ||
- id: 'step-8' | ||
- id: 'step-7' | ||
uses: 'ruby/setup-ruby@v1' | ||
with: | ||
ruby-version: '3.2.3' | ||
- id: 'step-9' | ||
- id: 'step-8' | ||
name: 'Publish to Playstore' | ||
working-directory: 'fastlane' | ||
run: |- | ||
|