-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cd): build and attach plugin binary to dev github release
- Loading branch information
1 parent
b1c80fc
commit b632333
Showing
1 changed file
with
40 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: CD | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- src/** | ||
- package.json | ||
- tsconfig.json | ||
- webpack.config.js | ||
- .github/workflows/cd.yml | ||
workflow_dispatch: | ||
jobs: | ||
dev-release: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Build plugin | ||
run: npm run dist | ||
- name: Remove existing artifacts | ||
uses: andreaswilli/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: dev | ||
- name: Calculate short SHA | ||
shell: bash | ||
run: echo "GITHUB_SHORT_SHA=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | ||
- name: Upload binary to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: publish/joplin.plugin.templates.jpl | ||
asset_name: joplin.plugin.templates.dev-${{ env.GITHUB_SHORT_SHA }}.jpl | ||
tag: dev |