Skip to content

ci: publish package, update devDependencies #35

ci: publish package, update devDependencies

ci: publish package, update devDependencies #35

Workflow file for this run

name: EasyTunnel CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- if: github.event_name == 'pull_request'
name: Lint commit messages
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
- name: Checkout server
uses: actions/checkout@v4
with:
repository: namecheap/mytunnel-server
ref: master
path: server
- name: Start server
run: |
npm ci
npm run dev &
npx -y wait-on tcp:127.0.0.1:8087 --log
working-directory: server
- run: npm test
publish:
name: 'Publish'
needs: build
runs-on: ubuntu-latest
environment: npm_publish
# if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
- run: npm ci
- name: Publish new version
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release --dry-run