From 3d8e3104307bfd01487a4342672fd2be5bba6f56 Mon Sep 17 00:00:00 2001 From: Thomas Hughes Date: Fri, 20 Sep 2019 15:16:57 -0500 Subject: [PATCH] Setup CI --- .github/workflows/ci.yml | 15 +++++++++++++++ .github/workflows/create-release.yml | 25 ------------------------- README.md | 2 +- package.json | 3 +-- 4 files changed, 17 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/create-release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..170330a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,15 @@ +name: "Tests" + +on: + pull_request: + push: + branches: # array of glob patterns matching against refs/heads. Optional; defaults to all + - master # triggers on pushes that contain changes in master + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: npm ci + - run: npm test diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml deleted file mode 100644 index 2c4140c..0000000 --- a/.github/workflows/create-release.yml +++ /dev/null @@ -1,25 +0,0 @@ -on: - push: - # Sequence of patterns matched against refs/tags - tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 - -name: Create Release - -jobs: - build: - name: Create Release - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@master - - name: Create Release - id: create_release - uses: actions/create-release@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false diff --git a/README.md b/README.md index 97e190a..705be32 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # GitHub Action - Releases API This GitHub Action (written in JavaScript) wraps the [GitHub Release API](https://developer.github.com/v3/repos/releases/), specifically the [Create a Release](https://developer.github.com/v3/repos/releases/#create-a-release) endpoint, to allow you to leverage GitHub Actions to create releases. -GitHub Actions status +GitHub Actions status ## Usage ### Pre-requisites diff --git a/package.json b/package.json index cb3fd7a..f421ffa 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,7 @@ { "name": "create-release", "version": "1.0.0", - "private": true, - "description": "Generate a release and upload build artifacts", + "description": "Generate a release", "main": "dist/index.js", "scripts": { "lint": "eslint 'src/**.js' 'test/**.js' --fix",