Skip to content

Update changelog

Update changelog #29

Workflow file for this run

name: Release
on:
push:
branches: [ test-main ]
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 rev-parse v${{ steps.update-changelog.outputs.version }}-changelog-action-test || git tag v${{ steps.update-changelog.outputs.version }}-changelog-action-test
- 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
uses: CasperWA/push-protected@v2
with:
token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
branch: test-main
unprotect_reviews: true
tags: true
interval: 10 # seconds between checks
pre_sleep: 15
fail_fast: true
- 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
dry-run: true
- name: Create GitHub release
if: needs.changelog.outputs.release-type != 'no-release'
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.update-changelog.outputs.version }}-changelog-action-test
body: ${{ steps.update-changelog.outputs.content }}
token: ${{ secrets.GITHUB_TOKEN }}