chore: ensure @lumeweb/portal-frontend is private #290
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 | |
on: | |
push: | |
branches: | |
- develop | |
workflow_dispatch: | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
permissions: | |
pull-requests: write | |
contents: write | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup | |
uses: ./.github/actions/setup-all | |
with: | |
node_version: 20.10.0 | |
go_version: 1.23.0 | |
- name: Create Release Pull Request or Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
publish: pnpm changeset:publish | |
createGithubReleases: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# Check for portal-frontend changes and notify template repo | |
- if: steps.changesets.outputs.published == 'true' | |
name: Check portal-frontend changes and notify | |
id: check-changes | |
run: | | |
CHANGES=$(git diff --name-only HEAD^ HEAD apps/portal-frontend) | |
if [ ! -z "$CHANGES" ]; then | |
echo "has_changes=true" >> $GITHUB_OUTPUT | |
fi | |
- if: steps.check-changes.outputs.has_changes == 'true' | |
name: Trigger portal-frontend template repo update | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.PAT_TOKEN }} | |
repository: lumeweb/portal-frontend-template | |
event-type: portal-frontend-update | |
client-payload: | | |
{ | |
"source_sha": "${{ github.sha }}", | |
"source_ref": "${{ github.ref }}" | |
} | |
# if a release was published, release the Go modules | |
- if: steps.changesets.outputs.published == 'true' | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.PAT_TOKEN }} | |
repository: lumeweb/web | |
event-type: release-go |