Skip to content

Commit

Permalink
Merge 2024 10 21 (#70)
Browse files Browse the repository at this point in the history
Fix artifact save behavior on windows (make archives that can be extracted on linux)
Drop '-internal' references from node-go-simple.
  • Loading branch information
DenKoren authored Oct 21, 2024
1 parent 55ff8d4 commit 025c8b2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 32 deletions.
39 changes: 9 additions & 30 deletions .github/workflows/node-go-simple.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ jobs:
with:
github-token: ${{ env.GH_CI_PAT || secrets.GITHUB_TOKEN }}

- uses: milaboratory/github-ci-internal/blocks/node/build/generic@v4
- uses: milaboratory/github-ci/blocks/node/build/generic@v4
with:
build-script-name: ${{ inputs.build-script-name }}
node-version: ${{ inputs.node-version }}
Expand Down Expand Up @@ -464,16 +464,6 @@ jobs:
with:
submodules: ${{ inputs.checkout-submodules }}

- id: npm-pkg-metadata
uses: milaboratory/github-ci/actions/shell@v4
with:
run: |
NPM_PKG_NAME="$(cat "${GITHUB_WORKSPACE}/package.json" | jq --raw-output '.name')"
NPM_PKG_VERSION="$(cat "${GITHUB_WORKSPACE}/package.json" | jq --raw-output '.version')"
ghwa_set_output npm-pkg-name "${NPM_PKG_NAME}"
ghwa_set_output npm-pkg-version "${NPM_PKG_VERSION}"
- name: Prepare environment for running Golang
uses: milaboratory/github-ci/actions/golang/prepare@v4
with:
Expand All @@ -486,7 +476,7 @@ jobs:
with:
github-token: ${{ env.GH_CI_PAT || secrets.GITHUB_TOKEN }}

- uses: milaboratory/github-ci-internal/blocks/node/test@v4
- uses: milaboratory/github-ci/blocks/node/test@v4
with:
test-name: ${{ inputs.test-script-name }}
node-version: ${{ inputs.node-version }}
Expand All @@ -500,7 +490,7 @@ jobs:
outputs:
# Even constant outputs become initialized only after job start.
# All outputs of skipped jobs are always empty.
npm-pkg-version: ${{ fromJSON(steps.npm-pkg-metadata.outputs.data).npm-pkg-version }}
npm-pkg-version: ${{ needs.build.outputs.npm-pkg-version }}
started: 'true'

notify-test:
Expand Down Expand Up @@ -623,21 +613,10 @@ jobs:
with:
submodules: ${{ inputs.checkout-submodules }}

- id: npm-pkg-metadata
uses: milaboratory/github-ci/actions/shell@v4
with:
run: |
NPM_PKG_NAME="$(cat "${GITHUB_WORKSPACE}/package.json" | jq --raw-output '.name')"
NPM_PKG_VERSION="$(cat "${GITHUB_WORKSPACE}/package.json" | jq --raw-output '.version')"
ghwa_set_output npm-pkg-name "${NPM_PKG_NAME}"
ghwa_set_output npm-pkg-version "${NPM_PKG_VERSION}"
- id: npm-pkg-status
uses: milaboratory/github-ci/actions/node/npm-pkg-status@v4
with:
npm-pkg-name: ${{ fromJSON(steps.npm-pkg-metadata.outputs.data).npm-pkg-name }}
npm-pkg-version: ${{ fromJSON(steps.npm-pkg-metadata.outputs.data).npm-pkg-version }}
package-json-path: "${{ github.workspace }}/package.json"
registry-url: ${{ inputs.registry-url }}
npm-auth-token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -655,9 +634,9 @@ jobs:
if: steps.npm-pkg-status.outputs.exist == '0'
&& steps.context.outputs.is-release == 'true'
with:
github-token: ${{ senv.GH_CI_PAT || secrets.GITHUB_TOKEN }}
github-token: ${{ env.GH_CI_PAT || secrets.GITHUB_TOKEN }}

- uses: milaboratory/github-ci-internal/blocks/node/build/generic@v4
- uses: milaboratory/github-ci/blocks/node/build/generic@v4
if: steps.npm-pkg-status.outputs.exist == '0'
&& steps.context.outputs.is-release == 'true'
with:
Expand Down Expand Up @@ -727,7 +706,7 @@ jobs:
&& steps.context.outputs.is-release == 'true'
uses: milaboratory/github-ci/actions/release/create-with-tag@v4
env:
NPM_PKG_VERSION: ${{ fromJSON(steps.npm-pkg-metadata.outputs.data).npm-pkg-version }}
NPM_PKG_VERSION: ${{ steps.npm-pkg-status.outputs.pkg-version }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ format('v{0}', env.NPM_PKG_VERSION) }}
Expand All @@ -739,7 +718,7 @@ jobs:
outputs:
# Even constant outputs become initialized only after job start.
# All outputs of skipped jobs are always empty.
npm-pkg-version: ${{ fromJSON(steps.npm-pkg-metadata.outputs.data).npm-pkg-version }}
npm-pkg-version: ${{ steps.npm-pkg-status.outputs.pkg-version }}
started: 'true'

notify-release:
Expand Down Expand Up @@ -768,7 +747,7 @@ jobs:
telegram-token: ${{ secrets.TELEGRAM_API_TOKEN }}

job-status: |
${{ needs.create-release.result }}
${{ needs.release.result }}
${{ needs.publish-to-npm.result }}
product-name: ${{ inputs.app-name }}
Expand Down
2 changes: 1 addition & 1 deletion actions/artifact/save/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ runs:
fi
if [ "${RUNNER_OS}" == "Windows" ]; then
ARTIFACT_PATHS="${ARTIFACT_PATHS//\\/\\\\}" # escape windows delimiters to not confuse tar
ARTIFACT_PATHS="${ARTIFACT_PATHS//\\//}" # convert windows delimiters to not confuse tar
fi
echo "${ARTIFACT_PATHS}" > "${ARCHIVE_NAME}.files"
Expand Down
1 change: 0 additions & 1 deletion actions/node/npm-pkg-status/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ runs:

steps:
- name: Read package name and version
if: inputs.package-json-path != '0'
uses: milaboratory/github-ci/actions/shell@v4
id: package
env:
Expand Down

0 comments on commit 025c8b2

Please sign in to comment.