Skip to content

v1.5.3

v1.5.3 #46

name: Build release artifacts
on:
release:
types: [published]
jobs:
define-version:
uses: project-origin/.github/.github/workflows/reusable-tag-version.yaml@ec3646201b295b0aa27c957655d126d0c0eac04c
publish-container:
needs:
- define-version
uses: project-origin/.github/.github/workflows/reusable-build-push-container-ghcr.yaml@ec3646201b295b0aa27c957655d126d0c0eac04c
with:
imagename: ghcr.io/project-origin/wallet-server
version: ${{ needs.define-version.outputs.version }}
context: ./src
dockerfile: ./src/ProjectOrigin.WalletSystem.Server/Dockerfile
push: true
publish-chart:
needs:
- define-version
- publish-container
uses: project-origin/.github/.github/workflows/reusable-publish-chart.yaml@ec3646201b295b0aa27c957655d126d0c0eac04c
with:
version: ${{ needs.define-version.outputs.version }}
chart_folder: charts/project-origin-wallet
helm_registry_repository: project-origin/helm-registry
secrets:
helm_registry_token: ${{ secrets.HELM_REGISTRY_TOKEN }}
publish-openapi:
name: Publish openapi to swaggerhub
runs-on: ubuntu-22.04
needs:
- define-version
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Install swaggerhub cli
run: npm i -g swaggerhub-cli
- name: Prepare openapi.json
run: jq '.info.version = "${{ needs.define-version.outputs.version }}"' src/ProjectOrigin.WalletSystem.IntegrationTests/ApiTests/ApiTests.open_api_specification_not_changed.verified.txt > openapi.json
- name: Publish to swaggerhub
env:
SWAGGERHUB_API_KEY: ${{ secrets.SWAGGERHUB_API_KEY }}
run: |
if ${{ !github.event.release.prerelease }}; then
swaggerhub api:create Project-Origin/WalletSystem/${{ needs.define-version.outputs.version }} --visibility=public --published=publish --setdefault --file openapi.json
else
swaggerhub api:create Project-Origin/WalletSystem/${{ needs.define-version.outputs.version }} --visibility=public --file openapi.json
fi
- name: Append openapi link to release notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release view v${{ needs.define-version.outputs.version }} --json body -q .body > body.md
cat << EOF >> body.md
## OpenAPI
[OpenAPI Specification](https://app.swaggerhub.com/apis/Project-Origin/WalletSystem/${{ needs.define-version.outputs.version }})
EOF
gh release edit v${{ needs.define-version.outputs.version }} -F body.md