Skip to content

Commit

Permalink
fix pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
zambrovski committed Nov 14, 2023
1 parent f5e9a88 commit 6f617f1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .github/release-notes.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
changelog:
sections:
- title: ":zap: Breaking Changes"
labels: [ "Type: breaking" ]
- title: ":rocket: Enhancements & Features"
labels: [ "Type: enhancement", "Type: documentation", "Type: example" ]
- title: ":bug: Bug Fixes"
Expand Down
23 changes: 6 additions & 17 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,16 @@ jobs:
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: pip

- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('./docs/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: python3 -m pip install -r ./docs/requirements.txt

Expand All @@ -48,7 +37,7 @@ jobs:
GH_USERNAME: ${{ github.actor }}

- name: Pre-fetch the gh-pages branch
run: git fetch
run: git fetch --depth=1

- name: Build docs with MkDocs
run: mkdocs build
Expand All @@ -61,13 +50,13 @@ jobs:
# This is for a tagged version
- name: Create a new version of documentation and push to GH pages.
if: startsWith(github.ref, 'refs/tags/')
run: mike deploy ${{ steps.get_tag_name.outputs.TAG_NAME }} stable --push --rebase -u
run: mike deploy ${{ steps.get_tag_name.outputs.TAG_NAME }} stable --push -u

- name: Make stable to default.
if: startsWith(github.ref, 'refs/tags/')
run: mike set-default stable --push --rebase
run: mike set-default stable --push

# This is for develop
- name: Deploy latest develop snapshot docs to GH pages.
if: github.ref == 'refs/heads/develop'
run: mike deploy snapshot --push --rebase -u
run: mike deploy snapshot --push -u
20 changes: 13 additions & 7 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ jobs:
server-username: OSS_CENTRAL_USERNAME # env variable for Maven Central
server-password: OSS_CENTRAL_PASSWORD # env variable for Maven Central

# Get GPG private key into GPG
- name: Import GPG Owner Trust
run: echo ${{ secrets.GPG_OWNERTRUST }} | base64 --decode | gpg --import-ownertrust

- name: Import GPG key
run: echo ${{ secrets.GPG_SECRET_KEYS }} | base64 --decode | gpg --import --no-tty --batch --yes

- name: Prepare mvnw
run: chmod +x ./mvnw

Expand All @@ -39,12 +32,25 @@ jobs:
- name: Run integration tests and generate coverage reports
run: ./mvnw -Pitest verify failsafe:verify

# Get GPG private key into GPG
- name: Import GPG Owner Trust
run: echo ${{ secrets.GPG_OWNERTRUST }} | base64 --decode | gpg --import-ownertrust

- name: Import GPG key
run: echo ${{ secrets.GPG_SECRET_KEYS }} | base64 --decode | gpg --import --no-tty --batch --yes

- name: Deploy a new version to central
run: ./mvnw clean deploy -B -DskipTests -DskipExamples -Prelease -Dgpg.keyname="${{secrets.GPG_KEYNAME}}" -Dgpg.passphrase="${{secrets.GPG_PASSPHRASE}}"
env:
OSS_CENTRAL_USERNAME: "${{ secrets.SONATYPE_USERNAME }}"
OSS_CENTRAL_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}"

- name: Upload coverage to Codecov
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}

- name: Upload test coverage to Codacy
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
run: bash <(curl -Ls https://coverage.codacy.com/get.sh)
Expand Down

0 comments on commit 6f617f1

Please sign in to comment.