Skip to content

Commit fc42829

Browse files
github.workflows.publish - restore release job, use newest MatteoCampinoti94/changelog-to-release@v1.0.6
1 parent fc76a92 commit fc42829

1 file changed

Lines changed: 50 additions & 50 deletions

File tree

.github/workflows/publish.yml

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -71,53 +71,53 @@ jobs:
7171
name: dist
7272
path: dist
7373

74-
# release:
75-
# name: Release
76-
# runs-on: ubuntu-latest
77-
# needs: publish
78-
# steps:
79-
# - uses: actions/checkout@v4
80-
# with:
81-
# fetch-depth: 0
82-
# - name: Get dist
83-
# uses: actions/download-artifact@v4
84-
# with:
85-
# name: dist
86-
# path: dist
87-
# - name: Get Tag
88-
# id: tag
89-
# uses: olegtarasov/get-tag@v2.1.1
90-
# - name: Clean CHANGELOG.md
91-
# run: |
92-
# touch CHANGELOG.md.tmp
93-
# npm install -g prettier
94-
# prettier --parser markdown --tab-width 4 --prose-wrap never CHANGELOG.md > CHANGELOG.md.tmp
95-
# cat CHANGELOG.md.tmp > CHANGELOG.md
96-
# - name: Build Release
97-
# id: release
98-
# uses: MatteoCampinoti94/changelog-to-release@v1.0.2
99-
# with:
100-
# version-name: ${{ steps.tag.outputs.tag }}
101-
# - name: Build Release File
102-
# env:
103-
# TAG: ${{ steps.tag.outputs.tag }}
104-
# RELEASE: ${{ steps.release.outputs.body }}
105-
# run: |
106-
# touch RELEASE.md
107-
# PREVIOUS_TAG="$(git tag -l --sort=-version:refname | head -2 | tail -1)"
108-
# printf "%s\n" "$RELEASE" > RELEASE.md
109-
# printf "\n## 🔗 Links\n" >> RELEASE.md
110-
# printf "\n* %s" "PyPi release: https://pypi.org/project/${GITHUB_REPOSITORY#*/}/${TAG#v}" >> RELEASE.md
111-
# printf "\n* %s" "Full changelog: https://github.com/$GITHUB_REPOSITORY/compare/$PREVIOUS_TAG...$TAG" >> RELEASE.md
112-
# cat RELEASE.md
113-
# printf "\n\n## Dist Files\n"
114-
# ls -l dist || echo " no files"
115-
# - name: Create Release
116-
# uses: softprops/action-gh-release@v1
117-
# with:
118-
# token: ${{ secrets.GITHUB_TOKEN }}
119-
# tag_name: ${{ steps.tag.outputs.tag }}
120-
# name: ${{ steps.release.outputs.title }}
121-
# body_path: RELEASE.md
122-
# files: |
123-
# dist/*
74+
release:
75+
name: Release
76+
runs-on: ubuntu-latest
77+
needs: publish
78+
steps:
79+
- uses: actions/checkout@v4
80+
with:
81+
fetch-depth: 0
82+
- name: Get dist
83+
uses: actions/download-artifact@v4
84+
with:
85+
name: dist
86+
path: dist
87+
- name: Get Tag
88+
id: tag
89+
uses: olegtarasov/get-tag@v2.1.1
90+
- name: Clean CHANGELOG.md
91+
run: |
92+
touch CHANGELOG.md.tmp
93+
npm install -g prettier
94+
prettier --parser markdown --tab-width 4 --prose-wrap never CHANGELOG.md > CHANGELOG.md.tmp
95+
cat CHANGELOG.md.tmp > CHANGELOG.md
96+
- name: Build Release
97+
id: release
98+
uses: MatteoCampinoti94/changelog-to-release@v1.0.6
99+
with:
100+
version-name: ${{ steps.tag.outputs.tag }}
101+
- name: Build Release File
102+
env:
103+
TAG: ${{ steps.tag.outputs.tag }}
104+
RELEASE: ${{ steps.release.outputs.body }}
105+
run: |
106+
touch RELEASE.md
107+
PREVIOUS_TAG="$(git tag -l --sort=-version:refname | head -2 | tail -1)"
108+
printf "%s\n" "$RELEASE" > RELEASE.md
109+
printf "\n## 🔗 Links\n" >> RELEASE.md
110+
printf "\n* %s" "PyPi release: https://pypi.org/project/${GITHUB_REPOSITORY#*/}/${TAG#v}" >> RELEASE.md
111+
printf "\n* %s" "Full changelog: https://github.com/$GITHUB_REPOSITORY/compare/$PREVIOUS_TAG...$TAG" >> RELEASE.md
112+
cat RELEASE.md
113+
printf "\n\n## Dist Files\n"
114+
ls -l dist || echo " no files"
115+
- name: Create Release
116+
uses: softprops/action-gh-release@v1
117+
with:
118+
token: ${{ secrets.GITHUB_TOKEN }}
119+
tag_name: ${{ steps.tag.outputs.tag }}
120+
name: ${{ steps.release.outputs.title }}
121+
body_path: RELEASE.md
122+
files: |
123+
dist/*

0 commit comments

Comments
 (0)