Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to automatically create a github release page based on a tag #354

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/release.yaml → .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ changelog:
exclude:
labels:
- ignore-for-release
- skip-changelog
categories:
- title: Breaking Changes 🛠
labels:
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
on:
push:
tags:
- '*'

name: Release 🚀

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

# - name: Set up Ruby
# uses: ruby/setup-ruby@v1
# with:
# bundler-cache: true

# - name: Prep Environment
# run: |
# bundle config set --local with 'release'
# bundle install
# mkdir -p build

# - name: Get previous Tag
# id: get-previous-tag
# run: |
# EXCLUDES=$(git describe --abbrev=0 --tags)
# PTAG=$(git describe --abbrev=0 --tags --exclude="${EXCLUDES}")
# echo "previous_tag=${PTAG}" >> "$GITHUB_OUTPUT"

# - name: Generate Changelog
# env:
# CHANGELOG_GITHUB_TOKEN: ${{ github.token }}
# run: |
# bundle exec github_changelog_generator \
# --user ${{ github.repository_owner }} \
# --project "hdm" \
# --since-tag ${{ steps.get-previous-tag.outputs.previous_tag }} \
# --future-release ${{ github.ref_name }} \
# --output build/changelog.md

# - name: Create Release
# env:
# GH_TOKEN: ${{ github.token }}
# run: gh release create ${{ github.ref_name }} --notes-file build/changelog.md --title "Release ${{ github.ref_name }}"

- name: Create Release
env:
GH_TOKEN: ${{ github.token }}
run: gh release create ${{ github.ref_name }} --generate-notes