Skip to content

Trigger NPM publishj #25

Trigger NPM publishj

Trigger NPM publishj #25

Workflow file for this run

name: Release
on:
push:
branches: [ changelog-action-test ]
jobs:
changelog:
uses: ./.github/workflows/changelog.yml
test:
uses: ./.github/workflows/test.yml
release:
needs: [ changelog, test ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update changelog
id: update-changelog
uses: OpenTermsArchive/changelog-action/release@v0.4.0
- name: Update package version
run: npm --no-git-tag-version --allow-same-version version ${{ steps.update-changelog.outputs.version }}
- name: Update repository
run: |
git config user.name "Open Terms Archive Release Bot"
git config user.email "release-bot@opentermsarchive.org"
git commit --message="Update changelog" CHANGELOG.md package.json package-lock.json
git push origin
- name: Tag commit
if: needs.changelog.outputs.release-type != 'no-release'
run: |
git tag v${{ steps.update-changelog.outputs.version }}-changelog-action-test
git push origin --tags
- name: Publish to NPM public repository
if: needs.changelog.outputs.release-type != 'no-release'
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPMJS_ACCESS_TOKEN }}
tag: changelog-action-test-rc.2
- name: Create GitHub release
if: needs.changelog.outputs.release-type != 'no-release'
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.release-changelog.outputs.version }}-changelog-action-test
body: ${{ steps.update-changelog.outputs.content }}
token: ${{ secrets.GITHUB_TOKEN }}