Skip to content

Commit dbd1b5d

Browse files
authored
Create releases automatically when VERSION is updated (contiv#4)
Signed-off-by: Antonin Bas <[email protected]>
1 parent bdd82da commit dbd1b5d

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- 'VERSION'
8+
9+
jobs:
10+
release:
11+
runs-on: [ubuntu-latest]
12+
steps:
13+
- name: Check-out code
14+
uses: actions/checkout@v2
15+
- name: Read version
16+
run: |
17+
echo "version=$(head VERSION)" >> $GITHUB_ENV
18+
- name: Create release
19+
uses: ncipollo/release-action@v1
20+
with:
21+
omitBody: true
22+
token: "${{ secrets.GITHUB_TOKEN }}"
23+
tag: "${{ env.version }}"
24+
commit: "${{ env.GITHUB_SHA }}"

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ Thank you for taking the time out to contribute to project Antrea!
44

55
## Contribute
66

7+
### Versioning
8+
9+
This project follows the [semantic versioning
10+
specification](https://semver.org/). A new Github release is created
11+
automatically whenever a commit is pushed to the "main" branch which modifies
12+
the `VERSION` file.
13+
714
### Inclusive Naming
815

916
For symbol names and documentation, do not introduce new usage of harmful

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v0.1.0

0 commit comments

Comments
 (0)