Skip to content

Commit

Permalink
update CI&CD
Browse files Browse the repository at this point in the history
  • Loading branch information
Winterreisender committed Jul 3, 2022
1 parent 7de5cf5 commit 24601fe
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 66 deletions.
61 changes: 0 additions & 61 deletions .github/workflows/gradle-cd.yml

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/gradle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,8 @@ jobs:
with:
arguments: publishToMavenLocal

- name: Copy Jars to Staging
run: mkdir staging && cp -r build/libs/*.jar staging/

- name: Copy Maven Repo to Staging
run: cp -r ~/.m2/repository/com/github/Winterreisender/* staging/
run: cp -r ~/.m2/repository/com/github/winterreisender/ staging/

- name: Upload
uses: actions/upload-artifact@v2
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/gradle-publish-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish Maven Packages for Windows

on:
release:
types: [published]
workflow_dispatch:

jobs:
build:
runs-on: windows-latest
environment: "action-packages"
steps:
- uses: actions/checkout@v3
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.4.2

- name: publish with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: publish
env:
USERNAME: ${{ secrets.USERNAME }}
TOKEN: ${{ secrets.TOKEN }}
6 changes: 5 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,13 @@ publishing {
url = uri("https://maven.pkg.github.com/Winterreisender/webviewko")
credentials {
username = System.getenv("USERNAME")
password = System.getenv("TOKEN") //project.findProperty("gpr.key") as String? ?:
password = System.getenv("TOKEN")
}
}
//maven {
// name = "GitHubPages"
// url = uri("file://${rootDir.resolve("docs/maven-repo")}")
//}
}
publications {
//publications {
Expand Down

0 comments on commit 24601fe

Please sign in to comment.