-
-
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.
- Loading branch information
Showing
6 changed files
with
80 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Deploy Production | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
type: choice | ||
description: Select version bump | ||
options: | ||
- major | ||
- minor | ||
- patch | ||
|
||
jobs: | ||
production: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
cache: "yarn" | ||
node-version-file: ".tool-versions" | ||
- name: Setup build dependencies | ||
run: make deps | ||
- name: Configure Git user | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
- name: Build | ||
run: | | ||
yarn run release | ||
git add dist/ | ||
- name: Bump Version | ||
run: | | ||
bumpver update --${{ github.event.inputs.version }} | ||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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,5 +1,22 @@ | ||
SHELL :=/usr/bin/env bash | ||
|
||
CHANGELOG=CHANGELOG.md | ||
CHANGELOG_TMP=tmp/$(CHANGELOG) | ||
|
||
.PHONY: deps | ||
deps: ## Install bumpver | ||
pip install bumpver==2024.1130 | ||
|
||
$(CHANGELOG_TMP): | ||
mkdir -p tmp | ||
echo -e "# Mercury Parser Changelog\n" > $(CHANGELOG_TMP) | ||
echo $(now) | ||
echo -e "### $(BUMPVER_NEW_VERSION) ($$(date '+%b %d, %Y'))\n" >> $(CHANGELOG_TMP) | ||
yarn run --silent changelog-maker --format=markdown >> $(CHANGELOG_TMP) | ||
cat $(CHANGELOG) | sed 1d >> $(CHANGELOG_TMP) | ||
cp $(CHANGELOG_TMP) $(CHANGELOG) | ||
|
||
$(CHANGELOG): $(CHANGELOG_TMP) | ||
|
||
.PHONY: changelog | ||
changelog: $(CHANGELOG) |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[bumpver] | ||
current_version = "2.2.3" | ||
version_pattern = "[MAJOR].[MINOR].[PATCH]" | ||
commit_message = "bump version {old_version} -> {new_version}" | ||
tag_message = "{new_version}" | ||
tag_scope = "default" | ||
pre_commit_hook = "scripts/update-changelog" | ||
post_commit_hook = "" | ||
commit = true | ||
tag = true | ||
push = false | ||
|
||
[bumpver.file_patterns] | ||
"package.json" = ['"version": "{version}"'] | ||
"bumpver.toml" = ['current_version = "{version}"'] |
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,6 +1,6 @@ | ||
{ | ||
"name": "@jocmp/mercury-parser", | ||
"version": "2.2.3-dev", | ||
"version": "2.2.3", | ||
"description": "Mercury Parser transforms web pages into clean text. Publishers and programmers use it to make the web make sense, and readers use it to read any web article comfortably.", | ||
"author": "jocmp <[email protected]>", | ||
"homepage": "https://github.com/jocmp/mercury-parser", | ||
|
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
make changelog | ||
git add CHANGELOG.md |