-
Notifications
You must be signed in to change notification settings - Fork 734
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Release & Prerelease tested on Fork * Create cold-fireants-provide.md
- Loading branch information
1 parent
1df6b0c
commit b53cbc8
Showing
3 changed files
with
32 additions
and
45 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,5 @@ | ||
--- | ||
wrangler: patch | ||
--- | ||
CI/CD | ||
- Release flow triggered on PR's closed |
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
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 |
---|---|---|
@@ -1,66 +1,47 @@ | ||
|
||
name: Release | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: | ||
- changeset-release/main | ||
|
||
jobs: | ||
build: | ||
if: ${{ github.event.pull_request.merged == true }} | ||
name: Build & Publish an alpha release to NPM | ||
release: | ||
if: ${{github.event.pull_request.merged}} | ||
name: Release | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node_version: [16.7] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node_version }} | ||
uses: actions/setup-node@v2 | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
fetch-depth: 0 | ||
|
||
- name: Copy README.md | ||
run: cp README.md packages/wrangler/README.md | ||
|
||
- name: Use Node.js 16.7 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.7 | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install NPM dependencies | ||
run: npm install | ||
|
||
- name: Copy README.md | ||
run: cp README.md packages/wrangler/README.md | ||
|
||
- name: Build | ||
run: npm run build | ||
working-directory: packages/wrangler | ||
|
||
release: | ||
if: ${{ github.event.pull_request.merged == true }} | ||
needs: [build] | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js 16.7 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.7 | ||
|
||
- name: Publish to NPM | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: npx changeset publish --tag beta | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | ||
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} |