Skip to content

Commit

Permalink
Initial work to setup to automatically publish artifacts on new releases
Browse files Browse the repository at this point in the history
  • Loading branch information
jayohms committed Dec 21, 2020
1 parent 143ed9f commit ec41d33
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish

on:
release:
types: [published]

jobs:
publish-release:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Publish artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew -Pversion=${{ github.event.release.tag_name }} publish
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: CI
on: [pull_request, push]

on: [push]

jobs:
test:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Run tests
run: ./gradlew testRelease
9 changes: 3 additions & 6 deletions turbo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ apply plugin: 'maven-publish'
apply plugin: 'org.jetbrains.dokka'

ext {
// Update when releasing a new library version
libVersionName = '7.0.0-alpha05'

libVersionName = version
libraryName = 'Turbo Native for Android'
libraryDescription = 'Android framework for making Turbo native apps'

Expand Down Expand Up @@ -46,7 +44,6 @@ android {
defaultConfig {
minSdkVersion 24
targetSdkVersion 30
versionName libVersionName

// Define ProGuard rules for this android library project. These rules will be applied when
// a consumer of this library sets 'minifyEnabled true'.
Expand Down Expand Up @@ -147,8 +144,8 @@ afterEvaluate {
url = uri('https://maven.pkg.github.com/hotwired/turbo-android')

credentials {
username = System.getenv('GITHUB_USER')
password = System.getenv('GITHUB_ACCESS_TOKEN')
username = System.getenv('GITHUB_ACTOR')
password = System.getenv('GITHUB_TOKEN')
}
}
}
Expand Down

0 comments on commit ec41d33

Please sign in to comment.