-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from ONLYOFFICE/feat/actions
feat: github actions
- Loading branch information
Showing
3 changed files
with
76 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,36 @@ | ||
name: Artifact | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened] | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
artifact: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get Info | ||
run: | | ||
echo "id=$(jq -r '.id' plugin.json)" >> $GITHUB_OUTPUT | ||
echo "version=$(jq -r '.version' plugin.json)" >> $GITHUB_OUTPUT | ||
id: info | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.16.1 | ||
|
||
- name: Build Plugin | ||
run: | | ||
export NODE_OPTIONS=--openssl-legacy-provider | ||
make dist | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ steps.info.outputs.id }}-${{ steps.info.outputs.version }} | ||
path: dist/${{ steps.info.outputs.id }}-${{ steps.info.outputs.version }}.tar.gz |
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,35 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [master, main] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.16.1 | ||
|
||
- name: Get Info | ||
run: | | ||
echo "id=$(jq -r '.id' plugin.json)" >> $GITHUB_OUTPUT | ||
echo "version=$(jq -r '.version' plugin.json)" >> $GITHUB_OUTPUT | ||
id: info | ||
|
||
- name: Build Plugin | ||
run: | | ||
export NODE_OPTIONS=--openssl-legacy-provider | ||
make dist | ||
- name: Create Release | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
gh release create "v${{ steps.info.outputs.version }}" --notes "$(make docs)" | ||
gh release upload "v${{ steps.info.outputs.version }}" dist/${{ steps.info.outputs.id }}-${{ steps.info.outputs.version }}.tar.gz |
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