-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
49b4e3c
commit b2883ae
Showing
3 changed files
with
77 additions
and
69 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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
name: Publish Plugin | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "*" | ||
- '*' | ||
|
||
env: | ||
PLUGIN_NAME: logseq-plugin-colored-threads | ||
|
@@ -14,61 +14,61 @@ jobs: | |
name: Publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set Node.js 20.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.x | ||
- uses: actions/checkout@v3 | ||
- name: Set Node.js 20.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Run install | ||
uses: borales/[email protected] | ||
with: | ||
cmd: install # will run `yarn install` command | ||
- name: Run install | ||
uses: borales/[email protected] | ||
with: | ||
cmd: install # will run `yarn install` command | ||
|
||
- name: Build package bundle | ||
uses: borales/[email protected] | ||
with: | ||
cmd: build # will run `yarn build` command | ||
|
||
- name: Zip build | ||
id: zip | ||
run: | | ||
mv dist ${{ env.PLUGIN_NAME }} | ||
cp example.png settings.png logo.svg README.md package.json ${{ env.PLUGIN_NAME }} | ||
zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }} | ||
tar -cvzf ${{ env.PLUGIN_NAME }}.tgz ${{ env.PLUGIN_NAME }} | ||
ls | ||
echo "::set-output name=tag_name::$(git tag --sort version:refname | tail -n 1)" | ||
- name: Build package bundle | ||
uses: borales/[email protected] | ||
with: | ||
cmd: build # will run `yarn build` command | ||
|
||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
id: create_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
VERSION: ${{ github.ref }} | ||
with: | ||
allowUpdates: true | ||
draft: false | ||
prerelease: false | ||
- name: Zip build | ||
id: zip | ||
run: | | ||
mv dist ${{ env.PLUGIN_NAME }} | ||
cp example.png settings.png logo.svg README.md package.json ${{ env.PLUGIN_NAME }} | ||
zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }} | ||
tar -cvzf ${{ env.PLUGIN_NAME }}.tgz ${{ env.PLUGIN_NAME }} | ||
ls | ||
echo "::set-output name=tag_name::$(git tag --sort version:refname | tail -n 1)" | ||
- name: Upload zip file | ||
id: upload_zip | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./${{ env.PLUGIN_NAME }}.zip | ||
asset_name: ${{ env.PLUGIN_NAME }}-${{ github.ref }}.zip | ||
asset_content_type: application/zip | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
id: create_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
VERSION: ${{ github.ref }} | ||
with: | ||
allowUpdates: true | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload package.json | ||
id: upload_metadata | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./package.json | ||
asset_name: package.json | ||
asset_content_type: application/json | ||
- name: Upload zip file | ||
id: upload_zip | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./${{ env.PLUGIN_NAME }}.zip | ||
asset_name: ${{ env.PLUGIN_NAME }}-${{ github.ref }}.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload package.json | ||
id: upload_metadata | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./package.json | ||
asset_name: package.json | ||
asset_content_type: application/json |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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