Skip to content

Commit

Permalink
Added release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
soumeh01 committed Sep 20, 2023
1 parent c35ba37 commit 84de70a
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on:
push:
tags:
- "*"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
update-tpip-report:
uses: Open-CMSIS-Pack/generator-bridge/.github/workflows/tpip-check.yml@main

goreleaser:
needs: [ update-tpip-report ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
check-latest: true

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion .github/workflows/tpip-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
# Running this job only on specific event
# in order to have workaround for issue
# related to deletion of GH checks/status data
if: ${{ github.event_name == 'workflow_dispatch' }}
if: ${{ github.event_name == 'workflow_dispatch' || github.ref_type == 'tag' }}
needs: [ check-licenses ]
runs-on: ubuntu-latest
timeout-minutes: 5
Expand Down
30 changes: 30 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
project_name: cbridge

builds:
- env: [CGO_ENABLED=0]
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
main: ./cmd

archives:
- files:
- LICENSE
- README.md
- third_party_licenses.md

format_overrides:
- goos: windows
format: zip

# Set to true, if you want all files in the archive to be in a single directory.
# If set to true and you extract the archive 'goreleaser_Linux_arm64.tar.gz',
# you get a folder 'goreleaser_Linux_arm64'.
# If set to false, all files are extracted separately.
# You can also set it to a custom folder name (templating is supported).
# Default is false.
wrap_in_directory: true

0 comments on commit 84de70a

Please sign in to comment.