Skip to content

Commit

Permalink
feat: add Github release
Browse files Browse the repository at this point in the history
  • Loading branch information
artemrys authored and Artem Rys committed Nov 12, 2021
1 parent 224c327 commit fe20f5c
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,53 @@ jobs:
uses: actions/checkout@v2
- name: Check License Header
uses: apache/skywalking-eyes@main

publish:
name: Build Release
needs:
- compliance-copyrights
- pre-commit
- test-unit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: false
# Very important: semantic-release won't trigger a tagged
# build if this is not set false
persist-credentials: false
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Install Poetry
run: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -
- name: Install Code
run: |
# shellcheck disable=SC1090
source "$HOME/.poetry/env"
poetry install
- name: Build
run: |
# shellcheck disable=SC1090
source "$HOME/.poetry/env"
poetry build
- name: Semantic Release
uses: cycjimmy/[email protected]
with:
semantic_version: 17
extra_plugins: |
@semantic-release/exec
@semantic-release/git
@google/semantic-release-replace-plugin
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_ADMIN }}

update-semver:
name: Move Respository semver tags
if: startsWith(github.ref, 'refs/tags/v')
needs: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: haya14busa/action-update-semver@v1
57 changes: 57 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#
# Copyright 2021 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
{
branches:
[
"+([0-9])?(.{+([0-9]),x}).x",
"main",
{ name: "develop", prerelease: "beta", channel: "beta" },
],
plugins:
[
"@semantic-release/commit-analyzer",
[
"@google/semantic-release-replace-plugin",
{
"replacements": [
{
"files": ["pyproject.toml"],
"from": "version ?=.*",
"to": "version = \"${nextRelease.version}\"",
"results": [
{
"file": "pyproject.toml",
"hasChanged": true,
"numMatches": 1,
"numReplacements": 1
}
],
"countMatches": true
}
]
}
],
"@semantic-release/release-notes-generator",
[
"@semantic-release/git",
{
"assets": [pyproject.toml"],
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}",
},
],
["@semantic-release/github", { "assets": [pyproject.toml"] }],
],
}

0 comments on commit fe20f5c

Please sign in to comment.