Skip to content

Commit 18cb27e

Browse files
committed
[wip] Release on NPM and GitHub Releases
1 parent 7f652fc commit 18cb27e

File tree

1 file changed

+48
-46
lines changed

1 file changed

+48
-46
lines changed

.github/workflows/release.yml

Lines changed: 48 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
name: Release
22

33
on:
4-
pull_request_target:
5-
branches:
6-
- main
7-
types: [ closed ]
4+
push:
85

96
permissions:
107
id-token: write # Required for OIDC. See https://docs.npmjs.com/trusted-publishers#step-2-configure-your-cicd-workflow
118
contents: read
129

1310
jobs:
14-
changelog:
15-
uses: "./.github/workflows/changelog.yml"
16-
test:
17-
uses: ./.github/workflows/test.yml
11+
# changelog:
12+
# uses: "./.github/workflows/changelog.yml"
13+
# test:
14+
# uses: ./.github/workflows/test.yml
1815
release:
19-
needs: [ changelog, test ]
20-
if: github.event.pull_request.merged == true && needs.changelog.outputs.release-type != 'no-release'
16+
# needs: [ changelog, test ]
17+
# if: github.event.pull_request.merged == true && needs.changelog.outputs.release-type != 'no-release'
2118
runs-on: ubuntu-latest
2219
steps:
2320
- name: Checkout
@@ -35,20 +32,20 @@ jobs:
3532
git config --global user.name "Open Terms Archive Release Bot"
3633
git config --global user.email "release-bot@opentermsarchive.org"
3734
38-
- name: Update changelog for release
39-
id: release-changelog
40-
uses: OpenTermsArchive/changelog-action/release@v0.4.0
35+
# - name: Update changelog for release
36+
# id: release-changelog
37+
# uses: OpenTermsArchive/changelog-action/release@v0.4.0
4138

42-
- name: Bump package version
43-
run: npm --no-git-tag-version version ${{ steps.release-changelog.outputs.version }}
39+
# - name: Bump package version
40+
# run: npm --no-git-tag-version version 2.2.0
4441

45-
- name: Commit CHANGELOG.md and package.json changes and create tag
46-
run: |
47-
git add "package.json"
48-
git add "package-lock.json"
49-
git add "CHANGELOG.md"
50-
git commit -m "Release v${{ steps.release-changelog.outputs.version }}"
51-
git tag v${{ steps.release-changelog.outputs.version }}
42+
# - name: Commit CHANGELOG.md and package.json changes and create tag
43+
# run: |
44+
# git add "package.json"
45+
# git add "package-lock.json"
46+
# git add "CHANGELOG.md"
47+
# git commit -m "Release v2.2.0"
48+
# git tag v2.2.0
5249

5350
- name: Run status checks for release commit on temporary branch # Use temporary branch to enable pushing commits to this branch protected by required status checks
5451
uses: CasperWA/push-protected@v2
@@ -63,34 +60,39 @@ jobs:
6360
- name: Publish to NPM public repository
6461
run: npm publish --provenance
6562

66-
- name: Push changes to repository
67-
run: git push origin && git push --tags
63+
# - name: Push changes to repository
64+
# run: git push origin && git push --tags
6865

6966
- name: Create GitHub release
7067
uses: softprops/action-gh-release@v2
7168
with:
72-
tag_name: v${{ steps.release-changelog.outputs.version }}
73-
body: ${{ steps.release-changelog.outputs.content }}
74-
token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
69+
tag_name: v2.2.0
70+
body: |
71+
## 2.2.0 - 2025-12-30
7572
76-
clean_changelog:
77-
if: github.event.pull_request.merged == true && needs.changelog.outputs.release-type == 'no-release'
78-
needs: [ changelog ]
79-
runs-on: ubuntu-latest
80-
steps:
81-
- uses: actions/checkout@v4
82-
with:
83-
token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
73+
_Full changeset and discussions: [#96](https://github.com/OpenTermsArchive/terms-types/pull/96)._
8474
85-
- name: Configure Git author
86-
run: |
87-
git config --global user.name "Open Terms Archive Release Bot"
88-
git config --global user.email "release-bot@opentermsarchive.org"
89-
90-
- name: Update changelog for release
91-
uses: OpenTermsArchive/changelog-action/release@v0.2.0
75+
> Development of this release was supported by [Reset Tech](https://www.reset.tech).
76+
token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
9277

93-
- name: Save changelog
94-
run: |
95-
git commit -m "Clean changelog" CHANGELOG.md
96-
git push origin
78+
# clean_changelog:
79+
# if: github.event.pull_request.merged == true && needs.changelog.outputs.release-type == 'no-release'
80+
# needs: [ changelog ]
81+
# runs-on: ubuntu-latest
82+
# steps:
83+
# - uses: actions/checkout@v4
84+
# with:
85+
# token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
86+
87+
# - name: Configure Git author
88+
# run: |
89+
# git config --global user.name "Open Terms Archive Release Bot"
90+
# git config --global user.email "release-bot@opentermsarchive.org"
91+
92+
# - name: Update changelog for release
93+
# uses: OpenTermsArchive/changelog-action/release@v0.2.0
94+
95+
# - name: Save changelog
96+
# run: |
97+
# git commit -m "Clean changelog" CHANGELOG.md
98+
# git push origin

0 commit comments

Comments
 (0)