Skip to content

Commit

Permalink
chore(gitflow): build release yml
Browse files Browse the repository at this point in the history
  • Loading branch information
esteinig committed Nov 1, 2023
1 parent 5202a57 commit 553dd46
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# release ci: build linux binaries and attach to release with SHA256

name: build and release
name: build

on:
workflow_dispatch:
release:
types: [ created ]
release:
types: [ published ]

permissions:
contents: write
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
if: matrix.platform.os_name != 'Windows-x86_64'
- name: Generate SHA-256 of uncompressed binary
run: shasum -a 256 target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }} | cut -d ' ' -f 1 > target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}.sha256
- name: Compress binary and package files
- name: Compress binary
run: tar -cJf target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}.tar.xz target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}
- name: Release binary and SHA-256 checksum to GitHub
uses: softprops/action-gh-release@v1
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on:
workflow_dispatch:
branches: main

jobs:
cog_check_job:
runs-on: ubuntu-latest
name: check conventional commit compliance
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0

release:
name: Perform release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Conventional commits check
uses: oknozor/cocogitto-action@v3
with:
check-latest-tag-only: true

- name: Cocogitto release
id: release
uses: oknozor/cocogitto-action@v3
with:
release: true
git-user: ${{ secrets.GITHUB_USERNAME }}
git-user-email: ${{ secrets.GITHUB_EMAIL }}

- name: Generate Changelog
run: cog changelog --at ${{ steps.release.outputs.version }} -t full_hash > GITHUB_CHANGELOG.md

- name: Upload github release
uses: softprops/action-gh-release@v1
with:
body_path: GITHUB_CHANGELOG.md
tag_name: ${{ steps.release.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 553dd46

Please sign in to comment.