Skip to content

Merge pull request #378 from streamdal/blinktag/remove_telemetry #118

Merge pull request #378 from streamdal/blinktag/remove_telemetry

Merge pull request #378 from streamdal/blinktag/remove_telemetry #118

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.20.0' # The Go version to download (if necessary) and use.
- name: Set tag
run: echo "GITHUB_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set short sha
run: echo "GITHUB_SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV
- name: Delete tag
uses: prompt/actions-delete-tag@v1
- name: Delete tag local
run: git tag -d ${{ env.GITHUB_TAG }}
- name: Inject version into version.txt
run: |
echo "${{ env.GITHUB_TAG }}-${{ env.GITHUB_SHORT_SHA }}" > version.txt
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Bumped version in version.txt to ${{ env.GITHUB_TAG }}
branch: master
tagging_message: ${{ env.GITHUB_TAG }}
push_options: '--force'
- name: Build
run: |
VERSION="$GITHUB_TAG-$GITHUB_SHORT_SHA" make build
- name: Update nfpm version value
run: |
sed -i '/version/ s/"[^"][^"]*"/"${{ env.GITHUB_TAG }}"/' nfpm.yaml
- name: Create DEB package
uses: blinktag/nfpm@v2.3.1
with:
config: "./nfpm.yaml"
packager: "deb"
target: "./build"
- name: Create RPM package
uses: blinktag/nfpm@v2.3.1
with:
config: "./nfpm.yaml"
packager: "rpm"
target: "./build"
- name: Create APK package
uses: blinktag/nfpm@v2.3.1
with:
config: "./nfpm.yaml"
packager: "apk"
target: "./build"
- name: Login to Docker Hub (streamdal)
uses: docker/login-action@v1
with:
registry: docker.io
username: ${{ secrets.STREAMDAL_DOCKERHUB_USERNAME }}
password: ${{ secrets.STREAMDAL_DOCKERHUB_TOKEN }}
- name: Build docker image
run: make docker/build
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
build/plumber*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger Helm Update
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.DISPATCH_TOKEN }}
repository: streamdal/plumber-helm
event-type: trigger-plumber-helm-workflow
client-payload: '{"plumber-version": "${{ env.GITHUB_TAG }}"}'