diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..9d072bda --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2d2820a7..978806ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/turbo/build.gradle b/turbo/build.gradle index 1eb8b912..65cc47a0 100644 --- a/turbo/build.gradle +++ b/turbo/build.gradle @@ -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' @@ -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'. @@ -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') } } }