From e36bc0a1dda1825e4abb671cdf080af1549ca7fc Mon Sep 17 00:00:00 2001 From: Timofey Mahnev Date: Mon, 30 Sep 2024 15:22:35 +0300 Subject: [PATCH] add release configuration --- .github/workflows/release.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c63a8da..fc372766 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,10 +12,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 'latest' cache: yarn @@ -40,3 +40,21 @@ jobs: jq ".version = $(jq .version ./dist/ng-select/package.json)" \ ./dist/ng-option-highlight/package.json > "$TEMPFILE" mv "$TEMPFILE" ./dist/ng-option-highlight/package.json + - name: Set up npm registry + run: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > ~/.npmrc + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: publish @ng-select/ng-option-highlight + run: yarn publish ./dist/ng-option-highlight + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: build demo + run: yarn run build:demo + + - name: Deploy demo 🚀 + uses: JamesIves/github-pages-deploy-action@releases/v4 + with: + branch: gh-pages + folder: dist/demo