Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding More Gifs #59

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build

on:
workflow_run:
workflows:
- Run Tests
types:
- completed

jobs:
build:

runs-on: ubuntu-latest

outputs:
nodeVersion: ${{ steps.bump_version.outputs.version }}
strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: build
id: build
run: |
yarn --frozen-lockfile
yarn build:cache
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git diff-index --quiet HEAD || git commit -m "updating cache"
git push
10 changes: 10 additions & 0 deletions .github/workflows/ex1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: EXone

on:
- pull_request

jobs:
job-1:
runs-on: ubuntu-latest
steps:
- run: echo 'hello'
14 changes: 14 additions & 0 deletions .github/workflows/ex2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: EXtwo

on:
workflow_run:
workflows: ["EXone"]
types: [completed]
branches:
- 'rileyhilliard/**'

jobs:
job2:
runs-on: ubuntu-latest
steps:
- run: echo ' world'
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

on:
workflow_run:
workflows: [Bump Version]
types:
- completed

jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: draft release
id: draft_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: ${{ needs.build.outputs.nodeVersion }}
release_name: Release ${{ needs.build.outputs.nodeVersion }}
body: |
Releasing version ${{ needs.build.outputs.nodeVersion }} to NPM
draft: true # Once tested this can be switched to false to immediately release to NPM
prerelease: false
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests
name: Run Tests

on: [pull_request]

Expand Down
54 changes: 10 additions & 44 deletions .github/workflows/versionbump.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: Bump NPM Version and draft release
name: Bump Version

on:
push:
branches:
- master
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'gifs.json'
workflow_run:
workflows:
- Build
types:
- completed

jobs:
build:
bump:

runs-on: ubuntu-latest

Expand All @@ -20,25 +19,11 @@ jobs:
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: yarn test
run: |
yarn
yarn test
env:
CI: true
- name: update cache
run: |
yarn build:cache
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git diff-index --quiet HEAD || git commit -m "updating cache"
git push
cache: 'yarn'
- name: bump version
id: bump_version
run: |
Expand All @@ -47,22 +32,3 @@ jobs:
echo "::set-output name=version::$(echo $(node -p "require('./package.json').version.trim()"))"
yarn version --patch
git push
release:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
node-version: [16.x]
steps:
- name: draft release
id: draft_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: ${{ needs.build.outputs.nodeVersion }}
release_name: Release ${{ needs.build.outputs.nodeVersion }}
body: |
Releasing version ${{ needs.build.outputs.nodeVersion }} to NPM
draft: true # Once tested this can be switched to false to immediately release to NPM
prerelease: false