This repository has been archived by the owner on Jul 25, 2024. It is now read-only.
fix: debug step actions #32
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: Release Please | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
release-please: | |
name: "Create release" | |
runs-on: ubuntu-latest | |
outputs: | |
releases_created: ${{ steps.release.outputs.releases_created }} | |
tag_name: ${{ steps.release.outputs.tag_name }} | |
package_names: ${{ steps.get-package-names.outputs.package_names }} | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
command: manifest | |
token: ${{secrets.GITHUB_TOKEN}} | |
default-branch: main | |
# The logic below handles the npm publication: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
# these if statements ensure that a publication only occurs when | |
# a new release is created: | |
if: ${{ steps.release.outputs.releases_created }} | |
- name: Yarn install | |
run: yarn install --immutable --immutable-cache | |
# for security reasons, use --check-cache if accepting PRs from third-parties. | |
if: ${{ steps.release.outputs.releases_created }} | |
# Conditionally publish packages based on changes in their respective dist directories | |
- name: Publish sdk-react-provider Package | |
if: ${{ steps.release.outputs.releases_created && contains(steps.release.outputs.release_created, 'sdk-react-provider') }} | |
run: | | |
cd dist/sdk-react-provider | |
npm pack --dry-run | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish sdk Package | |
if: ${{ steps.release.outputs.releases_created && contains(steps.release.outputs.release_created, 'sdk') }} | |
run: | | |
cd dist/sdk | |
npm pack --dry-run | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Debug | |
run: | | |
echo '${{ needs.release-please.outputs.releases_created || false }}' | |
echo '${{ steps.release.outputs.release_created }}' | |
echo '${{ steps.release.outputs.releases_created }}' | |
echo: | |
needs: [release-please] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Debug | |
run: | | |
echo '${{ needs.release-please.outputs.releases_created || false }}' | |
echo '${{ steps.release-please.outputs.releases_created }}' | |
echo '${{ steps.release-please.outputs.release_created }}' |