version updated to 1.0.9 #2
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
name: Publish epic.theme Package | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "epic.theme/**" | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./epic.theme | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.x' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm install | |
- name: Build the package | |
run: npm run build | |
- name: Verify package name and version | |
run: | | |
PACKAGE_NAME=$(node -p "require('./package.json').name") | |
PACKAGE_VERSION=$(node -p "require('./package.json').version") | |
echo "Package name: $PACKAGE_NAME" | |
echo "Package version: $PACKAGE_VERSION" | |
- name: Publish to npm | |
run: | | |
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} | |
npm publish --registry=https://registry.npmjs.org/ --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |