Skip to content

Commit

Permalink
update GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
joemaller committed Aug 18, 2023
1 parent 354c958 commit 86b3e1e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 39 deletions.
42 changes: 9 additions & 33 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,23 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Publish to NPM

on:
push:
tags: ["v*"]

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-20.04
publish:
name: Build and publish to npm
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v3
# https://github.com/actions/setup-node
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: &node-version 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

# publish-gpr:
# needs: build
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: 14
# registry-url: https://npm.pkg.github.com/
# - run: npm ci
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
6 changes: 4 additions & 2 deletions .github/workflows/release-from-version-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
name: Build Release
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v3

- name: Set up REPO and TAG environment vars
run: |
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ on: push

jobs:
build:
runs-on: ubuntu-20.04
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v3

# https://github.com/actions/setup-node
- uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies
run: npm ci
Expand All @@ -33,7 +40,8 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
# https://github.com/codecov/codecov-action
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
files: coverage/clover.xml
Expand All @@ -43,7 +51,8 @@ jobs:
# Repo Settings pane, click Test Coverage in the left sidebar. Find the ID in the
# second section.
- name: Code Climate coverage
uses: paambaati/[email protected]
# https://github.com/paambaati/codeclimate-action
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
Expand Down

0 comments on commit 86b3e1e

Please sign in to comment.