Skip to content

Commit

Permalink
👷 Adds back all github ci actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rickstaa committed Dec 22, 2020
1 parent d3edcba commit fb02da7
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/depup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Depup bump
on:
schedule:
- cron: "14 14 * * *" # Runs at 14:14 UTC every day
repository_dispatch:
types: [depup]

jobs:
reviewdog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: reviewdog/action-depup@v1
id: depup
with:
file: src/index.js
version_name: BUMP_VERSION
repo: haya14busa/bump

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "chore(deps): update bump to ${{ steps.depup.outputs.latest }}"
commit-message: "chore(deps): update bump to ${{ steps.depup.outputs.latest }}"
body: |
Update bump to [v${{ steps.depup.outputs.latest }}](https://github.com/${{ steps.depup.outputs.repo }}/releases/tag/v${{ steps.depup.outputs.latest }})
Compare [v${{ steps.depup.outputs.current }}...v${{ steps.depup.outputs.latest }}](https://github.com/${{ steps.depup.outputs.repo }}/compare/v${{ steps.depup.outputs.current }}...v${{ steps.depup.outputs.latest }})
This PR is auto generated by [depup workflow](https://github.com/${{ github.repository }}/actions?query=workflow%3Adepup).
branch: depup/bump
base: master
labels: "bump:minor"
63 changes: 63 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Release action
on:
push:
# Use push on master event to run workflow instead of pull_request
# closed (merged) event because github token doesn't have write permission
# for pull_request from fork repository.
branches:
- master
tags:
- 'v*.*.*'
pull_request:
types:
- labeled

jobs:
release:
if: github.event.action != 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# Bump version on merging Pull Requests with specific labels. (bump:major,bump:minor,bump:patch)
- id: bumpr
if: "!startsWith(github.ref, 'refs/tags/')"
name: haya14busa/action-bumpr
uses: ./

# Update corresponding major and minor tag. e.g. Update v1 and v1.2 when releasing v1.2.3
- uses: haya14busa/action-update-semver@v1
if: "!steps.bumpr.outputs.skip"
with:
github_token: ${{ secrets.github_token }}
tag: ${{ steps.bumpr.outputs.next_version }}

# Get tag name.
- id: tag
uses: haya14busa/action-cond@v1
with:
cond: "${{ startsWith(github.ref, 'refs/tags/') }}"
if_true: ${{ github.ref }}
if_false: ${{ steps.bumpr.outputs.next_version }}

# Create release.
- uses: actions/create-release@v1
if: "steps.tag.outputs.value != ''"
env:
# This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.value }}
release_name: Release ${{ steps.tag.outputs.value }}
body: ${{ steps.bumpr.outputs.message }}
draft: false
prerelease: false

release-check:
if: github.event.action == 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Post bumpr status comment
- name: haya14busa/action-bumpr
uses: ./
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Action test
on:
push:
branches:
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Test action
uses: ./
id: Test

0 comments on commit fb02da7

Please sign in to comment.