Skip to content

Commit

Permalink
fix: display repo name as title for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
StarTrooper08 committed Jul 1, 2024
1 parent be22708 commit 88f66c8
Showing 1 changed file with 30 additions and 15 deletions.
45 changes: 30 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,39 @@
name: Release project

on:
push:
branches: ['main']
push:
branches: ['main']

permissions:
contents: read
contents: read

jobs:
release:
permissions:
contents: write # to be able to publish a GitHub release
release:
permissions:
contents: write # to be able to publish a GitHub release

name: Release
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

name: Release
runs-on: ubuntu-latest
- name: Get the latest tag version
id: get_version
run: echo "TAG=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Create release title
id: create_title
run: |
REPO_NAME=$(basename $GITHUB_REPOSITORY)
VERSION=$TAG
RELEASE_TITLE="$REPO_NAME v$VERSION"
echo "RELEASE_TITLE=$RELEASE_TITLE" >> $GITHUB_ENV
- name: Release
uses: huggingface/semver-release-action@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: huggingface/semver-release-action@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_title: ${{ env.RELEASE_TITLE }}

0 comments on commit 88f66c8

Please sign in to comment.