Skip to content

Commit

Permalink
Merge pull request #42 from RyosukeDTomita/feature/releases-workflow
Browse files Browse the repository at this point in the history
Feature/releases workflow
  • Loading branch information
RyosukeDTomita authored Jul 2, 2024
2 parents 8770f7d + fb9e04a commit 5a92b40
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/actions-linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ on:
pull_request:
paths:
- .github/workflows/*.yaml

defaults:
run:
shell: bash

jobs:
run-ghalint:
runs-on: ubuntu-latest
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/create_zip.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: create zip when main branch is pushed
on:
push:
branches:
- master
paths:
- "doc/**"

defaults:
run:
shell: bash

env:
ZIP_NAME: "tool_doc.zip"

jobs:
create_zip:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: clone application source code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: create zip
run: zip -r ${{ env.ZIP_NAME }} doc

- name: create zip
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # 4.3.3
with:
path: ${{ env.ZIP_NAME }}
name: ${{ env.ZIP_NAME }}
1 change: 1 addition & 0 deletions .github/workflows/react-dependency-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
schedule:
# 日曜日の午前0時に実行
- cron: '0 0 * * 0'

defaults:
run:
shell: bash
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/release_document.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Create a zip in Releases when a tag is created.
on:
release:
types: [created]

defaults:
run:
shell: bash

env:
ZIP_FILE: tool_doc.zip

jobs:
create_published:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: clone application source code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: create zip
run: zip -r ${{ env.ZIP_FILE }} doc

- name: upload Releases
uses: shogo82148/actions-upload-release-asset@8f032eff0255912cc9c8455797fd6d72f25c7ab7 # v1.7.5
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.ZIP_FILE }}
asset_name: ${{ env.ZIP_FILE }}

0 comments on commit 5a92b40

Please sign in to comment.