Skip to content

Commit

Permalink
Publish Java to bestbeforetoday
Browse files Browse the repository at this point in the history
  • Loading branch information
bestbeforetoday committed Jan 24, 2023
1 parent 04e84eb commit fdfa8bb
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 95 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/maven_publish_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ set -eu -o pipefail
POM_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -q -DforceStdout)
PUBLISH_VERSION="${POM_VERSION%%-*}"

mvn --batch-mode versions:set -DnewVersion="${PUBLISH_VERSION}"
mvn --batch-mode --activate-profiles release -DskipTests deploy
mvn --batch-mode --no-transfer-progress versions:set -DnewVersion="${PUBLISH_VERSION}"
mvn --batch-mode --no-transfer-progress --activate-profiles release -DskipTests deploy
4 changes: 2 additions & 2 deletions .github/scripts/maven_publish_snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ POM_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpressi
GATEWAY_VERSION="${POM_VERSION%%-*}"
PUBLISH_VERSION="${GATEWAY_VERSION}-SNAPSHOT"

mvn --batch-mode versions:set -DnewVersion="${PUBLISH_VERSION}"
mvn --batch-mode --activate-profiles release -DskipTests deploy
mvn --batch-mode --no-transfer-progress versions:set -DnewVersion="${PUBLISH_VERSION}"
mvn --batch-mode --no-transfer-progress --activate-profiles release -DskipTests deploy
1 change: 1 addition & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
with:
java-version: 17
distribution: temurin
cache: maven
- name: Generate JavaDoc
run: make generate-docs-java
- name: Upload JavaDoc
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- name: Checkout source
uses: actions/checkout@v3
with:
ref: gh-pages
path: source
- name: Checkout publish
uses: actions/checkout@v3
Expand All @@ -27,20 +26,18 @@ jobs:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Remove old API documentation
shell: bash
run: rm -rf "${GITHUB_REF_NAME}/api"
run: rm -rf "${GITHUB_REF_NAME}/api"
working-directory: publish
- name: Download JavaDoc
uses: actions/download-artifact@v3
working-directory: publish
with:
name: java-doc
path: ${{ github.ref_name }}/api/java
path: publish/${{ github.ref_name }}/api/java
- name: Download Node documentation
uses: actions/download-artifact@v3
working-directory: publish
with:
name: node-doc
path: ${{ github.ref_name }}/api/node
path: publish/${{ github.ref_name }}/api/node
- name: Publish
working-directory: publish
env:
Expand Down Expand Up @@ -80,6 +77,7 @@ jobs:
with:
java-version: 8
distribution: temurin
cache: maven
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
with:
java-version: 8
distribution: temurin
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
Expand Down
171 changes: 86 additions & 85 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,90 +21,91 @@ jobs:
needs: verify-versions
uses: ./.github/workflows/build-docs.yml

go:
needs: verify-versions
runs-on: ubuntu-22.04
name: Test Go
strategy:
fail-fast: false
matrix:
go-version:
- 1.17
- 1.18
- 1.19
env:
SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Install SoftHSM
run: ./.github/scripts/install_softhsm.sh
env:
TMPDIR: ${{ runner.temp }}
- name: Generate mocks
run: make generate
- name: Run unit tests
run: make unit-test-go-pkcs11
- name: Pull Fabric Docker images
run: make pull-latest-peer
- name: Run scenario tests
run: make scenario-test-go
# go:
# needs: verify-versions
# runs-on: ubuntu-22.04
# name: Test Go
# strategy:
# fail-fast: false
# matrix:
# go-version:
# - 1.17
# - 1.18
# - 1.19
# env:
# SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-go@v3
# with:
# go-version: ${{ matrix.go-version }}
# - name: Install SoftHSM
# run: ./.github/scripts/install_softhsm.sh
# env:
# TMPDIR: ${{ runner.temp }}
# - name: Generate mocks
# run: make generate
# - name: Run unit tests
# run: make unit-test-go-pkcs11
# - name: Pull Fabric Docker images
# run: make pull-latest-peer
# - name: Run scenario tests
# run: make scenario-test-go

node:
needs: verify-versions
runs-on: ubuntu-22.04
name: Test Node
strategy:
fail-fast: false
matrix:
node-version:
- 14
- 16
- 18
env:
SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/setup-go@v3
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
- name: Run unit tests
run: make unit-test-node
- name: Install SoftHSM
run: ./.github/scripts/install_softhsm.sh
env:
TMPDIR: ${{ runner.temp }}
- name: Pull Fabric Docker images
run: make pull-latest-peer
- name: Run scenario tests
run: make scenario-test-node
# node:
# needs: verify-versions
# runs-on: ubuntu-22.04
# name: Test Node
# strategy:
# fail-fast: false
# matrix:
# node-version:
# - 14
# - 16
# - 18
# env:
# SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node-version }}
# - uses: actions/setup-go@v3
# with:
# go-version: ${{ env.DEFAULT_GO_VERSION }}
# - name: Run unit tests
# run: make unit-test-node
# - name: Install SoftHSM
# run: ./.github/scripts/install_softhsm.sh
# env:
# TMPDIR: ${{ runner.temp }}
# - name: Pull Fabric Docker images
# run: make pull-latest-peer
# - name: Run scenario tests
# run: make scenario-test-node

java:
needs: verify-versions
runs-on: ubuntu-22.04
name: Test Java
strategy:
fail-fast: false
matrix:
java-version:
- 8
- 11
- 17
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: temurin
- uses: actions/setup-go@v3
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
- name: Pull Fabric Docker images
run: make pull-latest-peer
- name: Run unit and scenario tests
run: make scenario-test-java
# java:
# needs: verify-versions
# runs-on: ubuntu-22.04
# name: Test Java
# strategy:
# fail-fast: false
# matrix:
# java-version:
# - 8
# - 11
# - 17
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-java@v3
# with:
# java-version: ${{ matrix.java-version }}
# distribution: temurin
# cache: maven
# - uses: actions/setup-go@v3
# with:
# go-version: ${{ env.DEFAULT_GO_VERSION }}
# - name: Pull Fabric Docker images
# run: make pull-latest-peer
# - name: Run unit and scenario tests
# run: make scenario-test-java
1 change: 1 addition & 0 deletions .github/workflows/verify-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
with:
java-version: 17
distribution: temurin
cache: maven
- name: Check Java artifact version
shell: bash
working-directory: java
Expand Down

0 comments on commit fdfa8bb

Please sign in to comment.