Skip to content

ci: remove unused token (#152) #12

ci: remove unused token (#152)

ci: remove unused token (#152) #12

Workflow file for this run

# SPDX-License-Identifier: MIT
name: release
on:
push:
tags:
- 'v*.*.*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v5
with:
go-version: '1.20.4'
- name: make all
run: |
make all
- name: generate changelog from git
run: |
echo "Image is available at \`ghcr.io/mercedes-benz/kosmoo/kosmoo:$(git describe --tags --exact-match)\`." > ${{ github.workflow }}-CHANGELOG.txt
git log --format=format:"* %h %s" $(git describe --tags --abbrev=0 @^)..@ >> ${{ github.workflow }}-CHANGELOG.txt
- name: push to package registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
make push
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: "kosmoo,LICENSE"
bodyFile: "${{ github.workflow }}-CHANGELOG.txt"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true