Update dependency node to v18 (#199) #767
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: ci | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
- release-* | |
release: | |
types: [created] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.18' | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: .node-version | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@seqsense' | |
- name: Run go vet | |
run: GOOS=js GOARCH=wasm go vet ./... | |
- name: Run go test | |
run: go test ./... -v -race -coverprofile=cover.out -covermode atomic -coverpkg ./... | |
- name: Build WASM | |
run: make pcdeditor.wasm | |
- uses: codecov/codecov-action@v3 | |
with: | |
file: ./cover.out | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- name: Install | |
run: npm install | |
- name: Type check | |
run: npm run typecheck | |
- name: Set PACKAGE_VERSION | |
run: | | |
if [ -z "${PACKAGE_VERSION}" ]; then | |
PACKAGE_VERSION=v0.0.0 | |
fi | |
echo "${PACKAGE_VERSION}" | sed 's/^v//;s/^/PACKAGE_VERSION=/' >> ${GITHUB_ENV} | |
env: | |
PACKAGE_VERSION: ${{ github.event.release.tag_name }} | |
- name: Pack | |
run: | | |
npm version ${PACKAGE_VERSION} --no-git-tag-version --allow-same-version | |
make pack | |
- name: Publish | |
if: github.event_name == 'release' | |
run: npm publish seqsense-pcdeditor-${PACKAGE_VERSION}.tgz | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |