-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
105 additions
and
3 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 |
---|---|---|
@@ -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 |
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 |
---|---|---|
@@ -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 }} |
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