Skip to content

ci: add splunk update-semver (#22) #123

ci: add splunk update-semver (#22)

ci: add splunk update-semver (#22) #123

Workflow file for this run

# ########################################################################
# 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.
# ########################################################################
on:
push:
branches:
- "main"
- "develop"
tags:
- "v*"
pull_request:
branches:
- "main"
- "develop"
permissions:
actions: read
checks: write
contents: write
deployments: read
packages: write
pull-requests: read
statuses: write
jobs:
build_action:
runs-on: ubuntu-latest
name: Build Action
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Semantic Release
uses: splunk/semantic-release-action@v1.3
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_ADMIN }}
update-semver:
if: startsWith(github.ref, 'refs/tags/v')
needs: build_action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: splunk/addonfactory-update-semver@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_ADMIN }}
with:
git_committer_name: ${{ secrets.SA_GH_USER_NAME }}
git_committer_email: ${{ secrets.SA_GH_USER_EMAIL }}
gpg_private_key: ${{ secrets.SA_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.SA_GPG_PASSPHRASE }}