Skip to content

Commit

Permalink
fix: test ver
Browse files Browse the repository at this point in the history
  • Loading branch information
plexoos committed Jul 9, 2024
1 parent ac3629b commit 6a6af14
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 48 deletions.
55 changes: 9 additions & 46 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,62 +19,25 @@ jobs:
with:
fetch-depth: 0 # Important for Semantic Release to analyze all commits

- name: Copy external assets
run: cp /home/runner/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh .

- name: Set up docker buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub container registry
uses: docker/login-action@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build image locally
uses: docker/build-push-action@v5
with:
context: .
tags: ${{ env.IMAGE_NAME }}:latest
pull: true
load: true
cache-from: ${{ env.IMAGE_NAME }}:latest
cache-to: type=inline

- name: Test esi-shell
run: ./esi-shell "opticks-full-prepare && opticks-t"
node-version: "lts/*"

- name: Declare latest and push
run: docker push ${{ env.IMAGE_NAME }}:latest
- run: npm install @semantic-release/exec -D

- name: Create semantic release
uses: cycjimmy/semantic-release-action@v4
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout new release
if: steps.semantic.outputs.new_release_published == 'true'
uses: actions/checkout@v4
with:
ref: ${{ steps.semantic.outputs.new_release_git_tag }}

- name: Copy external assets
run: cp /home/runner/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh .
- name: run command if new release published
run: |
export SEMVER=$(grep -Po '"version": "\K[^"]*' package.json)
sed -i "s/ESI_SHELL_VERSION=.*/ESI_SHELL_VERSION=${SEMVER}-$(git rev-parse --short HEAD)/g" esi-shell
- name: Build image for new release
if: steps.semantic.outputs.new_release_published == 'true'
uses: docker/build-push-action@v5
with:
context: .
tags: |
${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_NAME }}:${{ steps.semantic.outputs.new_release_version }}
push: true
provenance: false
cache-from: ${{ env.IMAGE_NAME }}:latest
cache-to: type=inline
- run: grep ESI_SHELL_VERSION esi-shell

cleanup:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions esi-shell
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ REQUIRED_DOCKER_VERSION=23.0.0
IMAGE_NAME="ghcr.io/bnlnpps/esi-shell"
DEFAULT_VERSION="latest"
VERSION=$DEFAULT_VERSION
ESI_SHELL_VERSION=
CONTAINER_COMMAND=
CONTAINER_OPTIONS=

Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esi-shell",
"version": "1.0.0-beta.15",
"version": "1.0.0-betatest.11",
"description": "EIC Simulation Infrastructure",
"repository": {
"type": "git",
Expand All @@ -12,5 +12,8 @@
"bugs": {
"url": "https://github.com/BNLNPPS/esi-shell/issues"
},
"homepage": "https://github.com/BNLNPPS/esi-shell#readme"
"homepage": "https://github.com/BNLNPPS/esi-shell#readme",
"devDependencies": {
"@semantic-release/exec": "^6.0.3"
}
}

0 comments on commit 6a6af14

Please sign in to comment.