Skip to content

feat(rbac): user rolebinding support (#91) #42

feat(rbac): user rolebinding support (#91)

feat(rbac): user rolebinding support (#91) #42

Workflow file for this run

# Copyright 2024 StreamNative, 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.
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
Release:
runs-on: ubuntu-latest
env:
ACCESS_TOKEN: ${{ secrets.SNBOT_GITHUB_TOKEN }}
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
ref: '${{ github.ref }}'
fetch-depth: 0
- name: Set Tag as Environment Variable
id: set_tag
run: |
echo "GORELEASER_CURRENT_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
LAST_TAG=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)
echo "GORELEASER_PREVIOUS_TAG=$LAST_TAG" >> $GITHUB_ENV
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version-file: go.mod
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549 # v5.2.0
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
- name: Setup Git token
run: |
git config --global user.email "[email protected]"
git config --global user.name "StreamNative Bot"
git config --global url."https://streamnativebot:${ACCESS_TOKEN}@github.com/".insteadOf "https://github.com/"
- name: goreleaser release (without release notes)
uses: goreleaser/goreleaser-action@v6
with:
args: release --clean --timeout 60m
env:
GITHUB_TOKEN: ${{ secrets.SNBOT_GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}