chore: bump version to 0.1.23 #37
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 on Push | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 23 | |
- name: Install dependencies | |
run: npm ci | |
- name: Test project | |
run: npm t | |
- name: Build project | |
run: npm run build | |
- name: Get NPM Publish Token | |
id: publish-token | |
uses: atlassian-labs/[email protected] | |
with: | |
output-modes: environment | |
- name: Configure .npmrc-public | |
run: | | |
if [ -z "$ARTIFACTORY_API_KEY" ] || [ -z "$ARTIFACTORY_USERNAME" ]; then | |
echo "Error: ARTIFACTORY_API_KEY or ARTIFACTORY_USERNAME is not set" | |
exit 1 | |
fi | |
ARTIFACTORY_API_KEY_ENCODED=$(echo -n $ARTIFACTORY_API_KEY | base64) && cat > .npmrc-public << EOF | |
registry=https://packages.atlassian.com/artifactory/api/npm/npm-public/ | |
@atlassian:registry=https://packages.atlassian.com/artifactory/api/npm/npm-public/ | |
//packages.atlassian.com/artifactory/api/npm/npm-public/:username=$ARTIFACTORY_USERNAME | |
//packages.atlassian.com/artifactory/api/npm/npm-public/:_password=${ARTIFACTORY_API_KEY_ENCODED} | |
//packages.atlassian.com/artifactory/api/npm/npm-public/:[email protected] | |
//packages.atlassian.com/artifactory/api/npm/npm-public/:always-auth=true | |
EOF | |
mv .npmrc-public ~/.npmrc-public | |
chmod 600 ~/.npmrc-public | |
- name: Publish package | |
run: npm publish --userconfig=~/.npmrc-public |