-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ci: Automatically create release note on the repo (#103)
* chore: auto-create release * chore: (temp) without publish * fix: getting package version * fix: files with package version * fix: upload zips * fix: discussion announcements * fix: id create release * feat: generate release notes * feat: using release-changelog-builder-action * feat: customize changelog builder * feat: custom template for changelog builder * feat: custom template for changelog builder * feat: custom template for changelog builder * feat: custom template for changelog builder * feat: custom template for changelog builder * feat: custom template for changelog builder * chore: using separated json config file * feat: custom template for changelog builder * chore: custom template for changelog builder * chore: adding full changelog * chore: publish and create release (not getting crx and xpi)
- Loading branch information
1 parent
3a8d473
commit 4c99c2a
Showing
1 changed file
with
88 additions
and
0 deletions.
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 |
---|---|---|
|
@@ -30,3 +30,91 @@ jobs: | |
uses: PlasmoHQ/[email protected] | ||
with: | ||
keys: ${{ secrets.BPP_KEYS }} | ||
|
||
- name: Get version from package.json | ||
id: package_version | ||
run: echo "::set-output name=version::$(node -p "require('./package.json').version")" | ||
|
||
- name: Create Tag | ||
run: git tag v${{ steps.package_version.outputs.version }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push Tag | ||
run: git push origin v${{ steps.package_version.outputs.version }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build Changelog | ||
id: github_release | ||
uses: mikepenz/release-changelog-builder-action@v4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
configurationJson: | | ||
{ | ||
"template": "#{{CHANGELOG}}\n\n**Full Changelog:** #{{RELEASE_DIFF}}", | ||
"pr_template": "- #{{TITLE}} by @#{{AUTHOR}} in ##{{NUMBER}}", | ||
"categories": [ | ||
{ | ||
"title": "## What's Changed" | ||
} | ||
] | ||
} | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ⏩ v${{ steps.package_version.outputs.version }} | ||
release_name: v${{ steps.package_version.outputs.version }} | ||
body: ${{ steps.github_release.outputs.changelog }} | ||
draft: false | ||
prerelease: false | ||
discussion_category_name: "Announcements" | ||
|
||
# - name: Download CRX and XPI files | ||
# run: | | ||
# wget -O releases/save-my-phind_${{ steps.package_version.outputs.version }}_chrome.crx "https://clients2.google.com/service/update2/crx?response=redirect&prodversion=90.0.4430.212&acceptformat=crx2,crx3&x=id%3Dagklnagmfeooogcppjccdnoallkhgkod%26uc" | ||
# | ||
# - name: Upload Release Asset Chrome CRX | ||
# uses: actions/upload-release-asset@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
# asset_path: ./releases/save-my-phind_${{ steps.package_version.outputs.version }}_chrome.crx | ||
# asset_name: save-my-phind_${{ steps.package_version.outputs.version }}_chrome.crx | ||
# asset_content_type: application/x-chrome-extension | ||
# | ||
# - name: Upload Release Asset Firefox XPI | ||
# uses: actions/upload-release-asset@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
# asset_path: ./releases/save-my-phind_${{ steps.package_version.outputs.version }}_firefox.xpi | ||
# asset_name: save-my-phind_${{ steps.package_version.outputs.version }}_firefox.xpi | ||
# asset_content_type: application/x-xpinstall | ||
|
||
- name: Upload Release Asset Chrome | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./releases/save-my-phind_${{ steps.package_version.outputs.version }}_chrome.zip | ||
asset_name: save-my-phind_${{ steps.package_version.outputs.version }}_chrome.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload Release Asset Firefox | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./releases/save-my-phind_${{ steps.package_version.outputs.version }}_firefox.zip | ||
asset_name: save-my-phind_${{ steps.package_version.outputs.version }}_firefox.zip | ||
asset_content_type: application/zip |