Skip to content

Commit

Permalink
chore: lerna publish
Browse files Browse the repository at this point in the history
  • Loading branch information
danilowoz committed Oct 24, 2021
1 parent 9e86c9f commit a0a952e
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 3 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Release

on:
push:
branches:
- feat/semantic-release # TODO - change to main branch

jobs:
bundler:
name: Build bundler
if: github.event_name == 'push' && github.ref == 'refs/heads/next'
runs-on: ubuntu-latest

steps:
- name: Setup | Clone codesandbox-client
uses: actions/checkout@v2
with:
repository: codesandbox/codesandbox-client

- uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Setup | Node.js
uses: actions/setup-node@v2
with:
node-version: "10.23.2"
registry-url: "https://npm.pkg.github.com/"

- name: Setup | Install dependencies
run: yarn

- name: Prepare | Build sandpack bundler
run: yarn build:sandpack

- name: Archive bundler artifacts
uses: actions/upload-artifact@v2
with:
name: bundler
path: www/**/*.*

publish:
runs-on: ubuntu-latest
needs: [bundler]
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Setup | Checkout
uses: actions/checkout@v2
with:
# pulls all commits (needed for lerna / semantic release to correctly version)
fetch-depth: "0"

- name: Setup | Node.js
uses: actions/setup-node@v2
with:
node-version: "12.22.4"
registry-url: "https://npm.pkg.github.com/"

- name: Setup | Configure git user
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Setup | Install dependencies
run: yarn install --frozen-lockfile

- name: Prepare | Download artifacts
uses: actions/download-artifact@v2
with:
name: bundler
path: bundler

- name: Prepare | Build
run: yarn run build:publish

- name: Release | Lerna Publish
run: lerna publish from-package --yes --canary #TODO - remove canary
17 changes: 17 additions & 0 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Lint PR"

on:
pull_request:
types:
- opened
- edited
- synchronize

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Lint | Lint PR Title
uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
branches:
- feat/semantic-release # TODO - change the branch
- feat/semantic-release # TODO - change to main branch

jobs:
bundler:
Expand Down Expand Up @@ -47,7 +47,6 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

steps:
- name: Setup | Checkout
Expand Down Expand Up @@ -85,4 +84,4 @@ jobs:
run: yarn run build:publish

- name: Release | Lerna Publish
run: lerna publish --canary prerelease --yes #TODO - remove canary
run: lerna publish from-package --yes --canary prerelease #TODO - remove canary

0 comments on commit a0a952e

Please sign in to comment.