Version Packages (#900) #506
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: | |
- main | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/[email protected] | |
with: | |
version: 6.32.2 | |
run_install: true | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "pnpm" | |
# TODO only do this when changesets are empty | |
- name: Build Packages | |
run: pnpm run build --filter=./packages | |
- name: Create Release Pull Request | |
uses: changesets/action@v1 | |
with: | |
publish: pnpm release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate Schema | |
run: pnpm run schema:generate | |
- name: Build Applications | |
run: pnpm run build | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: "${{ secrets.GITHUB_TOKEN }}" | |
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ENSEMBLE_WEB_STUDIO }}" | |
channelId: live | |
projectId: ensemble-web-studio | |
entryPoint: ./apps/preview | |
- name: Package Starter | |
working-directory: ./apps/starter | |
run: | | |
version=$(jq -r '.version' package.json) | |
zip -r "ensemble-starter-${version}.zip" build | |
cp "ensemble-starter-${version}.zip" ensemble-starter-latest.zip | |
- id: "auth" | |
uses: "google-github-actions/auth@v2" | |
with: | |
credentials_json: ${{ secrets.GCP_SERVICE_ACCT_KEY_JSON }} | |
- id: "upload-file" | |
uses: "google-github-actions/upload-cloud-storage@v2" | |
with: | |
path: "apps/starter" | |
destination: "ensemble-react-starter" | |
parent: false | |
glob: "*.zip" |