Skip to content

Commit

Permalink
ci: adds release job to automatically create new releases in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Addono committed Jan 31, 2021
1 parent c5ad430 commit 31c17c6
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Test

on: [push, pull_request]

jobs:

test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Build the test Docker image
run: docker build --tag wait-for .

- name: Run the tests
run: docker run --tty wait-for

release:
name: Release
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14

- name: Install dependencies
run: npm ci

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
27 changes: 25 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on: [push, pull_request]
jobs:

test:

runs-on: ubuntu-latest
name: Test
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
Expand All @@ -17,3 +17,26 @@ jobs:
- name: Run the tests
run: docker run --tty wait-for

release:
name: Release
runs-on: ubuntu-20.04

needs:
- test

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14

- name: Install dependencies
run: npm ci

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release

0 comments on commit 31c17c6

Please # to comment.