Feat: eas identifier attestation #114
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
name: "Java CI" | |
on: | |
push: | |
branches: | |
- main | |
- stage | |
paths-ignore: | |
- "ethereum/**" | |
- "src/main/javascript/crypto/**" | |
pull_request: | |
branches: | |
- main | |
- stage | |
paths-ignore: | |
- "ethereum/**" | |
- "src/main/javascript/crypto/**" | |
jobs: | |
java-p1: | |
uses: ./.github/workflows/java-p1.yml | |
js-p1: | |
needs: | |
- java-p1 | |
uses: ./.github/workflows/js-p1.yml | |
prerelease: | |
needs: | |
- java-p1 | |
- js-p1 | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref_name == 'stage' | |
outputs: | |
version: ${{ steps.publish.outputs.version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: "11" | |
cache: "gradle" | |
- name: change version to stage-snapshot | |
run: | | |
SHORT_SHA="${GITHUB_SHA:0:7}" | |
sed -i "s/^version\s*=.*/version = 'stage-${SHORT_SHA}-SNAPSHOT'/" build.gradle | |
cat build.gradle | |
- uses: actions/delete-package-versions@v3 | |
with: | |
package-name: "org.tokenscript.attestation" | |
min-versions-to-keep: 3 | |
- id: publish | |
name: Publish to Github Package | |
run: | | |
./gradlew --no-daemon publishAllPublicationsToGitHubPackagesRepository | |
version="$(./gradlew -q properties | sed -nr 's/^version: (.+)/\1/p')" | |
echo "version=${version}" >> $GITHUB_OUTPUT | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} | |
downstream-ci: | |
needs: | |
- prerelease | |
runs-on: ubuntu-latest | |
steps: | |
- name: Trigger Downstream CI | |
uses: convictional/trigger-workflow-and-wait@v1.6.5 | |
with: | |
owner: AlphaWallet | |
repo: attestation.id | |
github_token: ${{ secrets.PERSONAL_TOKEN }} | |
workflow_file_name: backend-p1.yml | |
client_payload: '{ "attestation_ver": "${{ needs.prerelease.outputs.version }}", "use_github_packages": "true" }' |