fix(notify): move types #1592
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 kit.zip | |
on: | |
push: | |
branches: | |
- main | |
- beta | |
- alpha | |
- next | |
tags: | |
- "*" | |
jobs: | |
test-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout kit | |
uses: actions/checkout@master | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.15.1' | |
- name: Check node $PATH version | |
shell: bash | |
run: | | |
node --version | |
npm --version | |
- name: npm i | |
shell: bash | |
run: | | |
cd "${{ env.wd_path }}" | |
npm i | |
- name: npm run ava | |
shell: bash | |
run: | | |
npm run ava | |
- name: npm run build-kit | |
shell: bash | |
env: | |
KIT: ${{ env.kit_path }} | |
KNODE: ${{ env.knode_path }} | |
run: | | |
npm run build-kit | |
- name: npm run test | |
uses: nick-invision/retry@v3 | |
with: | |
max_attempts: 3 | |
timeout_minutes: 30 | |
command: | | |
npm run test | |
env: | |
KIT: ${{ env.kit_path }} | |
KNODE: ${{ env.knode_path }} | |
test-mac-and-ubuntu: | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Inject slug/short variables | |
uses: rlespinasse/github-slug-action@v4 | |
- name: Get Time | |
id: time | |
uses: nanzm/get-time-action@v1.1 | |
with: | |
timeZone: 8 | |
format: "YYYY-MM-DD-HH-mm-ss" | |
- name: Checkout kit | |
uses: actions/checkout@master | |
- name: Install Node | |
run: | | |
mkdir -p ./.knode | |
./build/install-node.sh -v 20.15.1 -P ./.knode -y | |
- name: Build Kit | |
run: | | |
PATH="./.knode/bin:$PATH" npm i && PATH="./.knode/bin:$PATH" npm dedupe | |
PATH="./.knode/bin:$PATH" KIT=./.kit node ./build/build-ci.js | |
- name: Set env vars | |
run: | | |
echo "wd_path=$PWD" >> $GITHUB_ENV | |
echo "kit_path=$PWD/.kit" >> $GITHUB_ENV | |
echo "knode_path=$PWD/.knode" >> $GITHUB_ENV | |
echo "release_channel=${{ env.GITHUB_REF_SLUG_URL }}" >> $GITHUB_ENV | |
- name: Add node and kit to PATH | |
run: | | |
echo "${{ env.knode_path }}/bin" >> $GITHUB_PATH | |
echo "${{ env.kit_path }}/bin" >> $GITHUB_PATH | |
echo "---" | |
echo "$GITHUB_PATH" | |
echo "$PATH" | |
- name: Check node $PATH version | |
run: | | |
node --version | |
npm --version | |
- name: Log ./.kit | |
run: | | |
ls ./.kit/*/* | |
- name: npm i | |
run: | | |
cd "${{ env.wd_path }}" | |
npm i | |
- name: npm run ava | |
run: | | |
npm run ava | |
- name: npm run test | |
run: | | |
npm run test | |
env: | |
KIT: ${{ env.kit_path }} | |
KNODE: ${{ env.knode_path }} | |
release: | |
runs-on: macos-latest | |
needs: [test-windows, test-mac-and-ubuntu] | |
steps: | |
- name: Inject slug/short variables | |
uses: rlespinasse/github-slug-action@v4 | |
- name: Get Time | |
id: time | |
uses: nanzm/get-time-action@v1.1 | |
with: | |
timeZone: 8 | |
format: "YYYY-MM-DD-HH-mm-ss" | |
- name: Checkout kit | |
uses: actions/checkout@master | |
- name: Install Node | |
run: | | |
mkdir -p ./.knode | |
./build/install-node.sh -v 20.15.1 -P ./.knode -y | |
- name: Build Kit | |
run: | | |
PATH="./.knode/bin:$PATH" npm i && PATH="./.knode/bin:$PATH" npm dedupe | |
PATH="./.knode/bin:$PATH" KIT=./.kit node ./build/build-ci.js | |
- name: Set env vars | |
run: | | |
echo "wd_path=$PWD" >> $GITHUB_ENV | |
echo "kit_path=$PWD/.kit" >> $GITHUB_ENV | |
echo "knode_path=$PWD/.knode" >> $GITHUB_ENV | |
echo "release_channel=${{ env.GITHUB_REF_SLUG_URL }}" >> $GITHUB_ENV | |
- name: Add node and kit to PATH | |
run: | | |
echo "${{ env.knode_path }}/bin" >> $GITHUB_PATH | |
echo "${{ env.kit_path }}/bin" >> $GITHUB_PATH | |
echo "---" | |
echo "$GITHUB_PATH" | |
echo "$PATH" | |
- name: Check node $PATH version | |
run: | | |
node --version | |
npm --version | |
- name: Semantic Release | |
run: | | |
cd "${{ env.wd_path }}" | |
npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Archive Release | |
uses: thedoctor0/zip-release@master | |
with: | |
filename: "kit.zip" | |
path: ".kit" | |
- name: Create Draft Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.time.outputs.time }} | |
release_name: ${{ env.release_channel }} | |
draft: true | |
prerelease: false | |
- name: Create and Upload Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: ./kit.zip | |
tag_name: ${{ steps.time.outputs.time }} | |
name: ${{ env.release_channel }} | |
draft: true | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: eregon/publish-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ steps.create_release.outputs.id }} |