Skip to content

build: up deps

build: up deps #42

Workflow file for this run

name: Release
on:
push:
branches: [master, feature/*]
jobs:
release:
name: Release

Check failure on line 9 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 9, Col: 5): Required property is missing: runs-on
if: "!contains(github.event.head_commit.message, 'skip ci')"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with: { fetch-depth: 0 }
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Set Branch
id: branch
run: |
BNAME="$(echo -n ${GITHUB_REF##*/} | sed 's#/#-#g' | tr '[:upper:]' '[:lower:]')"
BID="$GITHUB_RUN_NUMBER-$(date +%s)"
echo "BRANCH_NAME=$BNAME" >> $GITHUB_ENV
echo "APP_BUILD=$BID-$GITHUB_SHA" >> $GITHUB_ENV
echo "BUILD_ID=$BID" >> $GITHUB_ENV
- name: Setup GIT
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
mkdir -p ~/.ssh
ssh-keyscan github.com > ~/.ssh/known_hosts
- name: Setup NPM
run: |
echo "Setup NPM"
echo 'always-auth=true' > ~/.npmrc
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> ~/.npmrc
echo '//npm.pkg.github.com/:_authToken=${GH_TOKEN}' >> ~/.npmrc
- name: Install dependencies
run: npm ci
- name: Check
run: |
npm run check-types
npm run lint
npm run test
- name: Build
run: npm run build
- name: Release GITHUB
run: |
if [[ $BRANCH_NAME == 'master' ]]; then
echo "Release production"
npm run release publish-github publish-npmjs
else
echo "Release canary"
npm run release -- publish-github prerelease=$BRANCH_NAME.$BUILD_ID
fi