From ddd26aa90ad582e4e2d83f2d23454b077dfadf54 Mon Sep 17 00:00:00 2001 From: watsonb8 Date: Wed, 5 Jun 2024 18:25:17 -0500 Subject: [PATCH] WIP --- .gitea/workflows/ci.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 7577a10..7f639b7 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -21,17 +21,18 @@ jobs: name: Version outputs: version: ${{ steps.get_version.outputs.version }} - commit: ${{ steps.get_commit.outputs.commit }} + commit: ${{ steps.get_version.outputs.commit }} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 18 - id: get_version - run: echo version=$(node -p "require('./package.json').version") >> "$GITHUB_OUTPUT" - - id: get_commit - run: echo "commit=$(echo $DRONE_COMMIT | cut -c1-5)" >> "$GITHUB_OUTPUT" - + run: | + export version=`node -p "require('./package.json').version"` + export commit=`echo $GITHUB_SHA | cut -c1-5` + echo "version=$version" >> "$GITHUB_OUTPUT" + echo "commit=$commit" >> "$GITHUB_OUTPUT" publish_tagged: name: Publish Latest @@ -46,12 +47,13 @@ jobs: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} COMMIT: ${{ needs.version.outputs.commit }} run: | - npm version prerelease --preid=$COMMIT --git-tag-version=false --allow-same-version=true + npm version prerelease --preid="$COMMIT" --git-tag-version=false --allow-same-version=true npm config set -- '//gitea.watsonlabs.net/api/packages/watsonb8/npm/:_authToken' "$NPM_TOKEN" npm publish deploy: runs-on: internal + name: Deploy needs: publish_tagged steps: - name: Set up SSH key