-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: adapt release workflow (#1137)
- Loading branch information
1 parent
d4f22e1
commit 392b37e
Showing
1 changed file
with
145 additions
and
147 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,150 +7,177 @@ on: | |
jobs: | ||
bootstrap: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
pnpm_store_path: ${{ steps.pnpm.outputs.pnpm_store_path }} | ||
pnpm_hash_key: ${{ steps.pnpm.outputs.pnpm_hash_key }} | ||
pnpm_restore_key: ${{ steps.pnpm.outputs.pnpm_restore_key }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: install | ||
uses: jetpack-io/[email protected] | ||
with: | ||
enable-cache: true | ||
- name: pnpm env | ||
id: pnpm | ||
shell: bash | ||
run: | | ||
echo "pnpm_store_path=$(devbox run pnpm store path --silent)" >> "$GITHUB_OUTPUT" | ||
echo "pnpm_hash_key=${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}" >> "$GITHUB_OUTPUT" | ||
echo "pnpm_restore_key=${{ runner.os }}-pnpm-store-" >> "$GITHUB_OUTPUT" | ||
- uses: actions/cache@v3 | ||
name: setup pnpm cache | ||
with: | ||
node-version: 14 | ||
cache: 'npm' | ||
- run: npm set unsafe-perm true | ||
- run: npm ci | ||
- run: npx lerna bootstrap --hoist | ||
path: ${{ steps.pnpm.outputs.pnpm_store_path }} | ||
key: ${{ steps.pnpm.outputs.pnpm_hash_key }} | ||
restore-keys: ${{ steps.pnpm.outputs.pnpm_restore_key }} | ||
- name: install | ||
run: devbox run pnpm install --frozen-lockfile | ||
|
||
apps_player: | ||
runs-on: ubuntu-latest | ||
needs: bootstrap | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: install | ||
uses: jetpack-io/[email protected] | ||
with: | ||
node-version: 14 | ||
cache: 'npm' | ||
|
||
enable-cache: true | ||
- uses: actions/cache@v3 | ||
name: setup pnpm cache | ||
with: | ||
path: ${{ needs.bootstrap.outputs.pnpm_store_path }} | ||
key: ${{ needs.bootstrap.outputs.pnpm_hash_key }} | ||
restore-keys: ${{ needs.bootstrap.outputs.pnpm_restore_key }} | ||
- name: install | ||
run: npm ci | ||
|
||
- name: release:prepare | ||
run: npx lerna run publish:prepare --scope @podlove/player --stream | ||
|
||
run: devbox run pnpm install --offline | ||
- name: build | ||
run: devbox run pnpm run build --scope @podlove/player | ||
- name: publish:npm | ||
uses: JS-DevTools/npm-publish@v2 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
package: apps/player/publish | ||
package: apps/player | ||
|
||
apps_web-player: | ||
runs-on: ubuntu-latest | ||
needs: bootstrap | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
cache: 'npm' | ||
|
||
- name: install | ||
run: npm ci | ||
|
||
- name: release:prepare | ||
run: npx lerna run publish:prepare --scope @podlove/web-player --stream | ||
|
||
- name: publish:npm | ||
uses: JS-DevTools/npm-publish@v2 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
package: apps/web-player/publish | ||
|
||
- name: cdn:prepare | ||
run: | | ||
rm -rf apps/web-player/publish | ||
npx lerna run build:cdn --scope @podlove/web-player --stream | ||
- uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
||
- name: checkout repo | ||
run: git clone [email protected]:podlove/cdn.git cdn | ||
|
||
- name: config | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "CI" | ||
- name: publish:cdn | ||
run: | | ||
cp -R apps/web-player/dist/* cdn/web-player/5.x/ | ||
ls -la cdn/web-player/5.x/ | ||
cd cdn | ||
git add . | ||
git commit -m "ci: upgrade cdn" | ||
git push origin | ||
- uses: actions/checkout@v3 | ||
- name: install | ||
uses: jetpack-io/[email protected] | ||
with: | ||
enable-cache: true | ||
- uses: actions/cache@v3 | ||
name: setup pnpm cache | ||
with: | ||
path: ${{ needs.bootstrap.outputs.pnpm_store_path }} | ||
key: ${{ needs.bootstrap.outputs.pnpm_hash_key }} | ||
restore-keys: ${{ needs.bootstrap.outputs.pnpm_restore_key }} | ||
- name: install | ||
run: devbox run pnpm install --offline | ||
- name: build | ||
run: devbox run pnpm run build --scope @podlove/web-player | ||
- name: publish:npm | ||
uses: JS-DevTools/npm-publish@v2 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
package: apps/web-player | ||
|
||
packages_components: | ||
runs-on: ubuntu-latest | ||
needs: bootstrap | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: install | ||
uses: jetpack-io/[email protected] | ||
with: | ||
node-version: 14 | ||
cache: 'npm' | ||
|
||
enable-cache: true | ||
- uses: actions/cache@v3 | ||
name: setup pnpm cache | ||
with: | ||
path: ${{ needs.bootstrap.outputs.pnpm_store_path }} | ||
key: ${{ needs.bootstrap.outputs.pnpm_hash_key }} | ||
restore-keys: ${{ needs.bootstrap.outputs.pnpm_restore_key }} | ||
- name: install | ||
run: npm ci | ||
|
||
- name: release:prepare | ||
run: npx lerna run publish:prepare --scope @podlove/components --stream | ||
|
||
run: devbox run pnpm install --offline | ||
- name: build | ||
run: devbox run pnpm run build --scope @podlove/components | ||
- name: publish:npm | ||
uses: JS-DevTools/npm-publish@v2 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
package: packages/components/publish | ||
package: packages/components | ||
|
||
packages_player-actions: | ||
runs-on: ubuntu-latest | ||
needs: bootstrap | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: install | ||
uses: jetpack-io/[email protected] | ||
with: | ||
node-version: 14 | ||
cache: 'npm' | ||
|
||
enable-cache: true | ||
- uses: actions/cache@v3 | ||
name: setup pnpm cache | ||
with: | ||
path: ${{ needs.bootstrap.outputs.pnpm_store_path }} | ||
key: ${{ needs.bootstrap.outputs.pnpm_hash_key }} | ||
restore-keys: ${{ needs.bootstrap.outputs.pnpm_restore_key }} | ||
- name: install | ||
run: devbox run pnpm install --offline | ||
- name: build | ||
run: devbox run pnpm run build --scope @podlove/player-actions | ||
- name: publish:npm | ||
uses: JS-DevTools/npm-publish@v2 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
package: packages/player/actions | ||
|
||
|
||
packages_player-state: | ||
runs-on: ubuntu-latest | ||
needs: bootstrap | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: install | ||
uses: jetpack-io/[email protected] | ||
with: | ||
node-version: 14 | ||
cache: 'npm' | ||
|
||
enable-cache: true | ||
- uses: actions/cache@v3 | ||
name: setup pnpm cache | ||
with: | ||
path: ${{ needs.bootstrap.outputs.pnpm_store_path }} | ||
key: ${{ needs.bootstrap.outputs.pnpm_hash_key }} | ||
restore-keys: ${{ needs.bootstrap.outputs.pnpm_restore_key }} | ||
- name: install | ||
run: devbox run pnpm install --offline | ||
- name: build | ||
run: devbox run pnpm run build --scope @podlove/player-state | ||
- name: publish:npm | ||
uses: JS-DevTools/npm-publish@v2 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
package: packages/player/actions | ||
package: packages/player/state | ||
|
||
packages_player-config: | ||
runs-on: ubuntu-latest | ||
needs: bootstrap | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: install | ||
uses: jetpack-io/[email protected] | ||
with: | ||
node-version: 14 | ||
cache: 'npm' | ||
|
||
enable-cache: true | ||
- uses: actions/cache@v3 | ||
name: setup pnpm cache | ||
with: | ||
path: ${{ needs.bootstrap.outputs.pnpm_store_path }} | ||
key: ${{ needs.bootstrap.outputs.pnpm_hash_key }} | ||
restore-keys: ${{ needs.bootstrap.outputs.pnpm_restore_key }} | ||
- name: install | ||
run: devbox run pnpm install --offline | ||
- name: build | ||
run: devbox run pnpm run build --scope @podlove/player-config | ||
- name: publish:npm | ||
uses: JS-DevTools/npm-publish@v2 | ||
with: | ||
|
@@ -162,17 +189,20 @@ jobs: | |
needs: bootstrap | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: install | ||
uses: jetpack-io/[email protected] | ||
with: | ||
node-version: 14 | ||
cache: 'npm' | ||
|
||
enable-cache: true | ||
- uses: actions/cache@v3 | ||
name: setup pnpm cache | ||
with: | ||
path: ${{ needs.bootstrap.outputs.pnpm_store_path }} | ||
key: ${{ needs.bootstrap.outputs.pnpm_hash_key }} | ||
restore-keys: ${{ needs.bootstrap.outputs.pnpm_restore_key }} | ||
- name: install | ||
run: npm ci | ||
|
||
- name: release:prepare | ||
run: npx lerna run publish:prepare --scope @podlove/utils --stream | ||
|
||
run: devbox run pnpm install --offline | ||
- name: build | ||
run: devbox run pnpm run build --scope @podlove/utils | ||
- name: publish:npm | ||
uses: JS-DevTools/npm-publish@v2 | ||
with: | ||
|
@@ -184,79 +214,47 @@ jobs: | |
needs: bootstrap | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
cache: 'npm' | ||
|
||
- name: install | ||
run: npm ci | ||
|
||
- name: release:prepare | ||
run: npx lerna run publish:prepare --scope @podlove/clients --stream | ||
|
||
- name: publish:npm | ||
uses: JS-DevTools/npm-publish@v2 | ||
uses: jetpack-io/[email protected] | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
package: packages/clients/publish | ||
|
||
packages_button-actions: | ||
runs-on: ubuntu-latest | ||
needs: bootstrap | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
enable-cache: true | ||
- uses: actions/cache@v3 | ||
name: setup pnpm cache | ||
with: | ||
node-version: 14 | ||
cache: 'npm' | ||
|
||
path: ${{ needs.bootstrap.outputs.pnpm_store_path }} | ||
key: ${{ needs.bootstrap.outputs.pnpm_hash_key }} | ||
restore-keys: ${{ needs.bootstrap.outputs.pnpm_restore_key }} | ||
- name: install | ||
run: devbox run pnpm install --offline | ||
- name: build | ||
run: devbox run pnpm run build --scope @podlove/clients | ||
- name: publish:npm | ||
uses: JS-DevTools/npm-publish@v2 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
package: packages/button/actions | ||
package: packages/clients | ||
|
||
packages_player-react: | ||
packages_button-actions: | ||
runs-on: ubuntu-latest | ||
needs: bootstrap | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
cache: 'npm' | ||
|
||
- name: install | ||
run: npm ci | ||
|
||
- name: release:prepare | ||
run: npx lerna run publish:prepare --scope @podlove/player-react --stream | ||
|
||
- name: publish:npm | ||
uses: JS-DevTools/npm-publish@v2 | ||
uses: jetpack-io/[email protected] | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
package: packages/player/react/publish | ||
|
||
packages_button-react: | ||
runs-on: ubuntu-latest | ||
needs: bootstrap | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
enable-cache: true | ||
- uses: actions/cache@v3 | ||
name: setup pnpm cache | ||
with: | ||
node-version: 14 | ||
cache: 'npm' | ||
|
||
path: ${{ needs.bootstrap.outputs.pnpm_store_path }} | ||
key: ${{ needs.bootstrap.outputs.pnpm_hash_key }} | ||
restore-keys: ${{ needs.bootstrap.outputs.pnpm_restore_key }} | ||
- name: install | ||
run: npm ci | ||
|
||
- name: release:prepare | ||
run: npx lerna run publish:prepare --scope @podlove/button-react --stream | ||
|
||
run: devbox run pnpm install --offline | ||
- name: build | ||
run: devbox run pnpm run build --scope @podlove/button-actions | ||
- name: publish:npm | ||
uses: JS-DevTools/npm-publish@v2 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
package: packages/button/react/publish | ||
package: packages/button/actions |