This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Botkube plugins on GitHub Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # to be able to publish a GitHub release | |
issues: write # to be able to comment on released issues | |
pull-requests: write # to be able to comment on released pull requests | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- name: Install GoReleaser | |
uses: goreleaser/goreleaser-action@v3 | |
with: | |
install-only: true | |
version: latest | |
- name: Build plugins and generate plugins index.yaml | |
env: | |
PLUGIN_DOWNLOAD_URL_BASE_PATH: "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}" | |
run: | | |
make build-plugins | |
make gen-plugin-index | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.11.0" | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npm install | |
npx semantic-release | |
# - name: Release description | |
# env: | |
# PLUGIN_DOWNLOAD_URL_BASE_PATH: "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}" | |
# run: | | |
# cat << EOF > release.md | |
# Botkube Plugins **${GITHUB_REF#refs/tags/}** version are now available! :rocket: | |
# To use plugins from this release, configure Botkube with: | |
# EOF | |
# cat << 'EOF' >> release.md | |
# ```yaml | |
# plugins: | |
# repositories: | |
# EOF | |
# cat << EOF >> release.md | |
# ${{ github.event.repository.name }}: | |
# url: ${PLUGIN_DOWNLOAD_URL_BASE_PATH}/plugins-index.yaml | |
# EOF | |
# cat << 'EOF' >> release.md | |
# ``` | |
# EOF | |
# - name: Publish GitHub release | |
# env: | |
# GH_TOKEN: ${{ github.token }} | |
# run: | | |
# gh release create "${GITHUB_REF#refs/tags/}" \ | |
# --notes-file release.md \ | |
# ./dist/executor_* \ | |
# ./plugins-index.yaml |