-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ddf8274
commit 04c2e09
Showing
18 changed files
with
406 additions
and
22 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Publish PR | ||
on: | ||
workflow_run: | ||
workflows: [Test] | ||
types: [completed] | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
repository: lukebemish/artifact-sync | ||
ref: refs/heads/main | ||
- run: mkdir repo | ||
- name: 'Download artifact' | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const pull_requests = ${{ toJSON(github.event.workflow_run.pull_requests) }}; | ||
if (!pull_requests.length) { | ||
return core.error("This workflow doesn't match any pull requests!"); | ||
} | ||
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
run_id: context.payload.workflow_run.id, | ||
}); | ||
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { | ||
return artifact.name == "artifacts" | ||
})[0]; | ||
let download = await github.rest.actions.downloadArtifact({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
artifact_id: matchArtifact.id, | ||
archive_format: 'zip', | ||
}); | ||
let fs = require('fs'); | ||
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/repo.zip`, Buffer.from(download.data)); | ||
- name: 'Unzip artifacts' | ||
run: unzip repo.zip -d repo | ||
- name: 'Publish artifacts' | ||
run: python3 run.py | ||
env: | ||
MAVEN_USER: github | ||
MAVEN_PASSWORD: ${{ secrets.PR_MAVEN_PASSWORD }} | ||
MAVEN_URL: "https://maven.lukebemish.dev/pullrequests/" | ||
ALLOWED_VERSION: '*-pr${{ github.event.workflow_run.pull_requests[0].number }}' | ||
ALLOWED_PATHS: "dev/lukebemish/opensesame/opensesame-*" |
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,37 @@ | ||
name: Release | ||
concurrency: ci-${{ github.ref }} | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: fregante/setup-git-user@v2 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: 17ZjI2NzVjNTUyZDhmOTczOGY2OTJkYmVlNDYyYjFlZmM0MTc5MGJjYzg5MjZkZGU1 | ||
- uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: tagRelease | ||
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') }} | ||
- uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: build | ||
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') }} | ||
- uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: publish | ||
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') }} | ||
env: | ||
IS_RELEASE: true | ||
MAVEN_USER: github | ||
MAVEN_PASSWORD: ${{ secrets.RELEASE_MAVEN_PASSWORD }} | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
- run: | | ||
git push | ||
git push --tags |
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,33 @@ | ||
name: Snapshot | ||
concurrency: ci-${{ github.ref }} | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: 17 | ||
- uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: build | ||
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') }} | ||
- uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: publish | ||
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') }} | ||
env: | ||
MAVEN_USER: github | ||
MAVEN_PASSWORD: ${{ secrets.SNAPSHOT_MAVEN_PASSWORD }} | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SNAPSHOT_MAVEN_URL: https://maven.lukebemish.dev/snapshots/ |
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,30 @@ | ||
name: Test | ||
concurrency: ci-${{ github.ref }} | ||
on: [workflow_dispatch, pull_request] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: 17 | ||
- uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: build | ||
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') }} | ||
- uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: publish | ||
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') }} | ||
env: | ||
PR_NUMBER: ${{ github.event.pull_request.number }} | ||
- name: Archive publishable artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: artifacts | ||
path: build/repo |
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
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
group=dev.lukebemish | ||
version=0.1.0 | ||
group=dev.lukebemish.opensesame |
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 |
---|---|---|
@@ -1,8 +1,3 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'maven-publish' | ||
} | ||
|
||
java.withSourcesJar() | ||
java.withJavadocJar() | ||
|
||
|
@@ -18,6 +13,34 @@ publishing { | |
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
|
||
pom { | ||
name = "OpenSesame - Runtime" | ||
packaging = 'jar' | ||
description = 'Runtime metafactory used for OpenSesame, a tool for fase typesafe access of private members with groovy' | ||
url = 'https://github.com/lukebemish/OpenSesame' | ||
inceptionYear = '2023' | ||
|
||
licenses { | ||
license { | ||
name = '3-Clause BSD License' | ||
url = 'https://opensource.org/license/bsd-3-clause/' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'lukebemish' | ||
name = 'Luke Bemish' | ||
email = '[email protected]' | ||
url = 'https://github.com/lukebemish/' | ||
} | ||
} | ||
scm { | ||
connection='scm:git:git://github.com/lukebemish/OpenSesame.git' | ||
developerConnection='scm:git:ssh://github.com/lukebemish/OpenSesame.git' | ||
url='https://github.com/lukebemish/OpenSesame' | ||
} | ||
} | ||
} | ||
} | ||
} |
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,59 @@ | ||
plugins { | ||
id 'groovy' | ||
} | ||
|
||
java.withSourcesJar() | ||
groovydoc.use = true | ||
|
||
tasks.register('groovydocJar', Jar) { | ||
dependsOn groovydoc | ||
archiveClassifier.set 'javadoc' | ||
from groovydoc.destinationDir | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation 'org.apache.groovy:groovy:4.0.12' | ||
implementation project(':opensesame-runtime') | ||
compileOnly 'org.jetbrains:annotations:24.0.1' | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
artifact tasks.groovydocJar | ||
|
||
pom { | ||
name = "OpenSesame - Transform" | ||
packaging = 'jar' | ||
description = 'Compile-time groovy ASTT used for OpenSesame, a tool for fase typesafe access of private members with groovy' | ||
url = 'https://github.com/lukebemish/OpenSesame' | ||
inceptionYear = '2023' | ||
|
||
licenses { | ||
license { | ||
name = '3-Clause BSD License' | ||
url = 'https://opensource.org/license/bsd-3-clause/' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'lukebemish' | ||
name = 'Luke Bemish' | ||
email = '[email protected]' | ||
url = 'https://github.com/lukebemish/' | ||
} | ||
} | ||
scm { | ||
connection='scm:git:git://github.com/lukebemish/OpenSesame.git' | ||
developerConnection='scm:git:ssh://github.com/lukebemish/OpenSesame.git' | ||
url='https://github.com/lukebemish/OpenSesame' | ||
} | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
rootProject.name = 'opensesame' | ||
|
||
include 'opensesame-runtime' | ||
include 'opensesame-runtime' | ||
include 'opensesame-transform' |
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
Oops, something went wrong.