Merge pull request #35 from thin-edge/feat-migrate-tedge-services #17
Workflow file for this run
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: release | |
permissions: | |
contents: write | |
on: | |
push: | |
tags: | |
- "*" | |
workflow_dispatch: | |
jobs: | |
release: | |
name: Package and release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: extractions/setup-just@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '>=1.20.0' | |
- run: go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest | |
name: Install dependencies | |
- name: Set version | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Package | |
run: just build | |
env: | |
SEMVER: ${{ env.RELEASE_VERSION }} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
generate_release_notes: true | |
draft: true | |
files: | | |
./dist/* | |
- name: Publish | |
if: startsWith(github.ref, 'refs/tags/') && env.PUBLISH_TOKEN | |
env: | |
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} | |
PUBLISH_REPO: ${{ secrets.PUBLISH_REPO }} | |
PUBLISH_OWNER: ${{ secrets.PUBLISH_OWNER }} | |
run: | | |
just publish |