From dbd1b5d4cee473fa65f6acf9a3667d6615001074 Mon Sep 17 00:00:00 2001 From: Antonin Bas Date: Tue, 6 Jul 2021 13:18:55 -0700 Subject: [PATCH] Create releases automatically when VERSION is updated (#4) Signed-off-by: Antonin Bas --- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ CONTRIBUTING.md | 7 +++++++ VERSION | 1 + 3 files changed, 32 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 VERSION diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0286fc7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: Release +on: + push: + branches: + - main + paths: + - 'VERSION' + +jobs: + release: + runs-on: [ubuntu-latest] + steps: + - name: Check-out code + uses: actions/checkout@v2 + - name: Read version + run: | + echo "version=$(head VERSION)" >> $GITHUB_ENV + - name: Create release + uses: ncipollo/release-action@v1 + with: + omitBody: true + token: "${{ secrets.GITHUB_TOKEN }}" + tag: "${{ env.version }}" + commit: "${{ env.GITHUB_SHA }}" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 036d175..c29c63e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,13 @@ Thank you for taking the time out to contribute to project Antrea! ## Contribute +### Versioning + +This project follows the [semantic versioning +specification](https://semver.org/). A new Github release is created +automatically whenever a commit is pushed to the "main" branch which modifies +the `VERSION` file. + ### Inclusive Naming For symbol names and documentation, do not introduce new usage of harmful diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..b82608c --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +v0.1.0