Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dm3ch committed Mar 4, 2024
1 parent 0786f2d commit e95cd9d
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Publish package

on:
push:
tags:
- v*.*.*
# tags:
# - v*.*.*

jobs:
publish-to-npm:
Expand All @@ -18,14 +18,14 @@ jobs:
registry-url: 'https://registry.npmjs.org'
scope: ${{ github.repository_owner }}

- name: Update package.json
run: |
TAG_NAME=${GITHUB_REF/refs\/tags\//}
PACKAGE_VERSION=${TAG_NAME#v}
echo "Updating package.json to version $PACKAGE_VERSION"
cat <<< $(jq -r ".version=\"$PACKAGE_VERSION\"" package.json) > package.json
cat <<< $(jq -r ".name=\"@${{ github.repository }}\"" package.json) > package.json
cat package.json
# - name: Update package.json
# run: |
# TAG_NAME=${GITHUB_REF/refs\/tags\//}
# PACKAGE_VERSION=${TAG_NAME#v}
# echo "Updating package.json to version $PACKAGE_VERSION"
# cat <<< $(jq -r ".version=\"$PACKAGE_VERSION\"" package.json) > package.json
# cat <<< $(jq -r ".name=\"@${{ github.repository }}\"" package.json) > package.json
# cat package.json

# - name: Install dependencies
# run: yarn install --frozen-lockfile
Expand All @@ -38,37 +38,37 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

publish-to-github:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
# publish-to-github:
# runs-on: ubuntu-latest
# permissions:
# contents: read
# packages: write
# steps:
# - name: Checkout
# uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
scope: ${{ github.repository_owner }}
# - uses: actions/setup-node@v3
# with:
# node-version: 18
# registry-url: 'https://npm.pkg.github.com'
# scope: ${{ github.repository_owner }}

- name: Update package.json
run: |
TAG_NAME=${GITHUB_REF/refs\/tags\//}
PACKAGE_VERSION=${TAG_NAME#v}
echo "Updating package.json to version $PACKAGE_VERSION"
cat <<< $(jq -r ".version=\"$PACKAGE_VERSION\"" package.json) > package.json
cat <<< $(jq -r ".name=\"@${{ github.repository }}\"" package.json) > package.json
cat package.json
# - name: Update package.json
# run: |
# TAG_NAME=${GITHUB_REF/refs\/tags\//}
# PACKAGE_VERSION=${TAG_NAME#v}
# echo "Updating package.json to version $PACKAGE_VERSION"
# cat <<< $(jq -r ".version=\"$PACKAGE_VERSION\"" package.json) > package.json
# cat <<< $(jq -r ".name=\"@${{ github.repository }}\"" package.json) > package.json
# cat package.json

# - name: Install dependencies
# run: yarn install --frozen-lockfile
# # - name: Install dependencies
# # run: yarn install --frozen-lockfile

# - name: Build
# run: yarn build
# # - name: Build
# # run: yarn build

- name: Publish
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Publish
# run: yarn publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e95cd9d

Please sign in to comment.