-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: display repo name as title for releases
- Loading branch information
1 parent
be22708
commit 88f66c8
Showing
1 changed file
with
30 additions
and
15 deletions.
There are no files selected for viewing
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
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 }} |