2.4.9 Release (#973) #106
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: Test/Deploy Master | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build-test: | |
runs-on: neodash-runners | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Creating Neo4j Container | |
run: | | |
chmod +x ./scripts/docker-neo4j-initializer/docker-neo4j.sh | |
./scripts/docker-neo4j-initializer/docker-neo4j.sh | |
sleep 30s | |
chmod +x ./scripts/docker-neo4j-initializer/start-movies-db.sh | |
./scripts/docker-neo4j-initializer/start-movies-db.sh | |
- run: yarn install | |
- name: Eslint check | |
run: yarn run lint | |
- name: Cypress run | |
uses: cypress-io/github-action@v4 | |
with: | |
build: yarn run build | |
start: yarn run dev | |
wait-on: 'http://localhost:3000' | |
browser: chrome | |
build-s3: | |
needs: build-test | |
runs-on: neodash-runners | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: rm -rf docs | |
- run: yarn install | |
- run: yarn run build-minimal | |
- name: Set AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-west-1 | |
- run: curl ${{ secrets.INDEX_HTML_DEPLOYMENT_URL }} > dist/index.html | |
- run: aws s3 rm s3://neodash.graphapp.io/ --recursive && aws s3 sync dist s3://neodash.graphapp.io/ --acl public-read | |
build-docker: | |
needs: build-test | |
runs-on: neodash-runners | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: run Docker | |
uses: actions/checkout@v2 | |
- run: rm -rf docs | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_LABS_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_LABS_ACCESS_TOKEN }} | |
- name: Set up Docker Build | |
uses: docker/setup-buildx-action@v1 | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:2.4.9 | |
build-docker-legacy: | |
needs: build-test | |
runs-on: neodash-runners | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: run Docker | |
uses: actions/checkout@v2 | |
- run: rm -rf docs | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.4.9 | |
deploy-gallery: | |
runs-on: neodash-runners | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: cd gallery && yarn install | |
- run: cd gallery && yarn run build | |
- name: Set AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-west-1 | |
- run: aws s3 rm s3://neodash-gallery.graphapp.io/ --recursive && aws s3 sync gallery/build s3://neodash-gallery.graphapp.io/ --acl public-read | |
deploy-docs: | |
needs: build-test | |
runs-on: neodash-runners | |
steps: | |
- name: Trigger Developer Event | |
uses: peter-evans/repository-dispatch@main | |
with: | |
token: ${{ secrets.DOCS_REFRESH_TOKEN }} | |
repository: neo4j-documentation/docs-refresh | |
event-type: labs | |
build-npm: | |
needs: build-test | |
runs-on: neodash-runners | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: rm -rf docs | |
- run: yarn install | |
- run: PRODUCTION=true && yarn run build-minimal | |
- run: curl ${{ secrets.INDEX_HTML_DEPLOYMENT_URL }} > dist/index.html | |
- run: npm pack | |
- run: rm -rf target | |
- run: mkdir target | |
- run: mv *.tgz target/ | |
- run: tar -xvf target/*.tgz | |
- run: rm -f target/*.tgz | |
- run: cp package/dist/favicon.ico package/favicon.ico | |
- run: echo "${{ secrets.NEO4J_LABS_APP_KEY }}" > neo4j-labs-app.pem | |
- run: echo "${{ secrets.NEO4J_LABS_APP_CERTIFICATE }}" > neo4j-labs-app.cert | |
- run: npx @neo4j/code-signer --app ./package --private-key neo4j-labs-app.pem --cert neo4j-labs-app.cert --passphrase ${{ secrets.NEO4J_DESKTOP_PASSPHRASE }} | |
- run: echo "${{ secrets.NEO4J_DESKTOP_CERTIFICATE }}" > neo4j_desktop.cert | |
- run: npx @neo4j/code-signer --verify --app ./package --root-cert neo4j_desktop.cert | |
- run: cd package && npm pack | |
- run: mv package/*.tgz . | |
- run: rm -rf package | |
- run: tar xvf *.tgz package | |
- run: npx @neo4j/code-signer --verify --app ./package --root-cert neo4j_desktop.cert | |
- run: rm -rf package | |
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc | |
- name: Publish package to NPM 📦 | |
run: npm publish --access public neodash*.tgz |