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

Commit

Permalink
chore: update workflows, set up nightly release
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed May 24, 2021
1 parent 0ad0f68 commit 0ea0ffb
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 24 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ on:
branches:
- main
jobs:
build:
main:
name: main
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: checkout
uses: actions/checkout@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand All @@ -32,12 +32,12 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
- name: Slack Notification
uses: 8398a7/action-slack@v3
if: always()
with:
status: ${{ job.status }}
fields: repo,commit,action,workflow
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# - name: Slack Notification
# uses: 8398a7/action-slack@v3
# if: always()
# with:
# status: ${{ job.status }}
# fields: repo,commit,action,workflow
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
42 changes: 42 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: nightly
on:
workflow_run:
workflows:
- main
types:
- completed
jobs:
nightly:
name: nightly
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: checkout
uses: actions/checkout@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: yarn install
- name: Build
run: yarn build
- name: Package
run: mv build reearth-web && tar -zcvf nightly.tar.gz reearth-web
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: nightly.tar.gz
commit: main
name: Nightly release
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
24 changes: 12 additions & 12 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: pr
on: [pull_request]
jobs:
build:
pr:
name: pr
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Checkout
uses: actions/checkout@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand All @@ -36,12 +36,12 @@ jobs:
GITHUB_PR_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_BRANCH_NAME: ${{ github.event.pull_request.base.ref }}
- name: Slack Notification
uses: 8398a7/action-slack@v3
if: always()
with:
status: ${{ job.status }}
fields: repo,commit,action,workflow
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# - name: Slack Notification
# uses: 8398a7/action-slack@v3
# if: always()
# with:
# status: ${{ job.status }}
# fields: repo,commit,action,workflow
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit 0ea0ffb

Please sign in to comment.