Skip to content

Commit

Permalink
ci: fix release name
Browse files Browse the repository at this point in the history
  • Loading branch information
hegerdes committed Jun 16, 2023
1 parent 8859cf9 commit 62c8174
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Create Release & Publish Package to npmjs
on:
push:
tags:
- "v*"

env:
NODE_VERSION: 18.x

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ env.NODE_VERSION }}"
registry-url: "https://registry.npmjs.org"

- name: Set Version
run: |
npm version --no-commit-hooks --allow-same-version --no-git-tag-version ${{ github.ref_name }}
npm version
- name: Install dependencies
run: npm install

- name: Build app
run: |
# Running test
if [[ "$(node --version)" == "v18"* ]]; then
export NODE_OPTIONS=--openssl-legacy-provider
fi
npm run dist
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: build
path: publish

- name: Archive Release
uses: thedoctor0/[email protected]
with:
type: zip
filename: joplin-plugin-remote-note-pull.zip
path: publish

- name: Create GH release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ github.ref_name }}
generate_release_notes: true
prerelease: false
files: joplin-plugin-remote-note-pull.zip
token: ${{ secrets.GITHUB_TOKEN }}

- name: Push npm package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 62c8174

Please sign in to comment.