Skip to content

Commit 1232465

Browse files
committed
release によりトリガーされるワークフローを作成
1 parent ea0dceb commit 1232465

File tree

9 files changed

+139
-1
lines changed

9 files changed

+139
-1
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: created
2+
on:
3+
release:
4+
types: [created]
5+
6+
jobs:
7+
Explore-GitHub-Actions:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event. And action is ${{ github.event.action }}"
11+
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
12+
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: deleted
2+
on:
3+
release:
4+
types: [deleted]
5+
6+
jobs:
7+
Explore-GitHub-Actions:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event. And action is ${{ github.event.action }}"
11+
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
12+
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: edited
2+
on:
3+
release:
4+
types: [edited]
5+
6+
jobs:
7+
Explore-GitHub-Actions:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event. And action is ${{ github.event.action }}"
11+
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
12+
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: prereleased
2+
on:
3+
release:
4+
types: [prereleased]
5+
6+
jobs:
7+
Explore-GitHub-Actions:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event. And action is ${{ github.event.action }}"
11+
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
12+
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: published
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
Explore-GitHub-Actions:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event. And action is ${{ github.event.action }}"
11+
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
12+
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: released
2+
on:
3+
release:
4+
types: [released]
5+
6+
jobs:
7+
Explore-GitHub-Actions:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event. And action is ${{ github.event.action }}"
11+
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
12+
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: unpublished
2+
on:
3+
release:
4+
types: [unpublished]
5+
6+
jobs:
7+
Explore-GitHub-Actions:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event. And action is ${{ github.event.action }}"
11+
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
12+
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: release
2+
on:
3+
release
4+
5+
jobs:
6+
Explore-GitHub-Actions:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event. And action is ${{ github.event.action }}"
10+
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
11+
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."

README.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,45 @@
11
# release-experimental
2-
GitHub Actions no
2+
3+
GitHub Actions の `release` のイベントについて調べます。
4+
5+
`release` のイベントは対象の Repository の Release の作成・変更・削除などによってトリガーされます。
6+
7+
8+
## Release イベントの Activity type
9+
10+
Activity type には以下の種類があります。
11+
12+
- `published`
13+
- `unpublished`
14+
- `created`
15+
- `edited`
16+
- `deleted`
17+
- `prereleased`
18+
- `released`
19+
20+
Activity type | 説明
21+
--|--
22+
`published` | a
23+
`unpublished` | a
24+
`created` | a
25+
`edited` | a
26+
`deleted` | a
27+
`prereleased` | a
28+
`released` | a
29+
30+
31+
32+
33+
以下を参考に、Release の状態変化とそれに伴う
34+
https://docs.github.com/ja/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#release
35+
36+
```mermaid
37+
stateDiagram-v2
38+
[*] --> Still
39+
Still --> [*]
40+
41+
Still --> Moving
42+
Moving --> Still
43+
Moving --> Crash
44+
Crash --> [*]
45+
```

0 commit comments

Comments
 (0)