Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
feat(gh-actions): Switching to GitHub actions
Browse files Browse the repository at this point in the history
As with other pact projects, karma-pact switches to GitHub actions, allowing a more streamlined development, testing and releasing experience.
  • Loading branch information
fernanfs committed Aug 12, 2021
1 parent 25308a1 commit 931e0a5
Show file tree
Hide file tree
Showing 12 changed files with 1,453 additions and 1,928 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build and test

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: script/ci/build-and-test.sh
env:
NODE_VERSION: ${{ matrix.node-version }}
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish and release

on:
repository_dispatch:
types:
- release-triggered

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: 'https://registry.npmjs.org'
- id: publish
run: script/ci/release.sh
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTOMATION_TOKEN}}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: v${{ steps.publish.outputs.version }}
release_name: Release v${{ steps.publish.outputs.version }}
body: ${{steps.publish.outputs.notes}}
draft: false
prerelease: false
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,3 @@ jscpd.json

# Pacts
pacts/

package-lock.json
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 931e0a5

Please sign in to comment.