Release sdk 3.3.0 🚀 (#120) #322
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: CI | |
on: | |
push: | |
branches-ignore: | |
- "release-please*" | |
permissions: write-all | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
outputs: | |
release_created_sdk: ${{ steps.release.outputs['packages/sdk--release_created'] }} | |
release_created_sdk_react_provider: ${{ steps.release.outputs['packages/sdk-react-provider--release_created'] }} | |
release_created: ${{ steps.release.outputs.release_created }} | |
releases_created: ${{ steps.release.outputs.releases_created }} | |
pr_created: ${{ steps.release.outputs.prs_created }} | |
tag_name: ${{ steps.release.outputs.tag_name }} | |
sha: ${{ steps.release.outputs.sha }} | |
steps: | |
- uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# target-branch: chore/my-please-release-testbranch | |
- name: echo values | |
run: | | |
echo "Release created SDK: ${{ steps.release.outputs['packages/sdk--release_created'] }}" | |
echo "Release created React Provider: ${{ steps.release.outputs['packages/sdk-react-provider--release_created'] }}" | |
echo "Releases created: ${{ steps.release.outputs.releases_created }}" | |
echo "PR created: ${{ steps.release.outputs.prs_created }}" | |
echo "Release tag_name: ${{ steps.release.outputs.tag_name }}" | |
echo "Release sha: ${{ steps.release.outputs.sha }}" | |
build: | |
env: | |
CI: "true" | |
needs: [release-please] | |
name: Build, Test, Lint and Publish | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Cache PNPM install and Turbo | |
uses: ./.github/actions/cache-setup | |
- name: Build | |
run: pnpm build | |
- name: Upload static files as artifact | |
id: docs-deployment | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: apps/developer/build | |
# - name: Deploy to GitHub Pages | |
# uses: peaceiris/actions-gh-pages@v4 | |
# with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# publish_dir: ./apps/developer/build | |
- name: Test | |
run: pnpm test | |
- name: Lint | |
run: pnpm lint | |
- name: Pre-Publish SDK | |
run: pnpm --filter @monerium/sdk pub:pre | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
if: needs.release-please.outputs.releases_created == 'false' | |
- name: Pre-Publish React Provider | |
run: pnpm --filter @monerium/sdk-react-provider pub:pre | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
if: needs.release-please.outputs.releases_created == 'false' | |
- name: Publish SDK | |
run: pnpm --filter @monerium/sdk publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
if: ${{ needs.release-please.outputs.release_created_sdk }} | |
- name: Publish React Provider | |
run: pnpm --filter @monerium/sdk-react-provider publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
if: ${{ needs.release-please.outputs.release_created_sdk_react_provider }} | |
deploy: | |
environment: | |
name: github-pages | |
runs-on: ubuntu-latest | |
needs: [build, release-please] | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Deploy to GitHub Pages | |
id: docs-deployment | |
if: needs.release-please.outputs.releases_created == 'true' | |
uses: actions/deploy-pages@v4 |