Skip to content

Commit

Permalink
Try conditionals in steps instead of jobs
Browse files Browse the repository at this point in the history
skip-checks:true

# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date:      Tue Oct 8 02:07:40 2024 +0000
#
# On branch data_load_use_actions
# Your branch is up to date with 'origin/data_load_use_actions'.
#
# Changes to be committed:
#	modified:   .github/workflows/deploy.yml
#
# Changes not staged for commit:
#	modified:   .gitignore
#	modified:   .vscode/settings.json
#	modified:   packages/jbrowse-plugin-apollo/src/OntologyManager/index.ts
#	modified:   packages/jbrowse-plugin-apollo/src/config.ts
#	modified:   packages/jbrowse-plugin-apollo/src/session/ClientDataStore.ts
#

# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date:      Tue Oct 8 02:07:40 2024 +0000
#
# On branch data_load_use_actions
# Your branch is up to date with 'origin/data_load_use_actions'.
#
# Changes to be committed:
#	modified:   .github/workflows/deploy.yml
#
# Changes not staged for commit:
#	modified:   .gitignore
#	modified:   .vscode/settings.json
#	modified:   packages/jbrowse-plugin-apollo/src/OntologyManager/index.ts
#	modified:   packages/jbrowse-plugin-apollo/src/config.ts
#	modified:   packages/jbrowse-plugin-apollo/src/session/ClientDataStore.ts
#
  • Loading branch information
garrettjstevens committed Oct 10, 2024
1 parent 0277d28 commit e4c7594
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ on:

jobs:
build:
name: Build and upload
if: inputs.environment == 'staging'
name: Build or fetch and upload
runs-on: ubuntu-latest
steps:
- name: Check out
Expand All @@ -27,24 +26,18 @@ jobs:
node-version: 18
cache: yarn
- name: Install
if: inputs.environment == 'staging'
run: yarn --immutable
- name: Build plugin
if: inputs.environment == 'staging'
run: yarn build
working-directory: packages/jbrowse-plugin-apollo
- name: Upload built plugin files
uses: actions/upload-artifact@v4
with:
name: plugin
path: |
packages/jbrowse-plugin-apollo/dist/jbrowse-plugin-apollo.umd.development.js
packages/jbrowse-plugin-apollo/dist/jbrowse-plugin-apollo.umd.production.min.js
fetch:
name: Fetch from NPM and upload
if: inputs.environment == 'prod'
runs-on: ubuntu-latest
steps:
- name: Fetch from NPM
- name: Fetch plugin
if: inputs.environment == 'prod'
working-directory: packages/jbrowse-plugin-apollo
run: |
mkdir --parents dist
cd dist/
wget --output-document=- --quiet https://registry.npmjs.org/@apollo-annotation/jbrowse-plugin-apollo/ > jpa.json
LATEST_VERSION=$(jq --raw-output '."dist-tags".latest' jpa.json)
TARBALL=$(jq --raw-output ".versions.\"${LATEST_VERSION}\".dist.tarball" jpa.json)
Expand All @@ -55,8 +48,8 @@ jobs:
with:
name: plugin
path: |
./jbrowse-plugin-apollo.umd.development.js
./jbrowse-plugin-apollo.umd.production.min.js
packages/jbrowse-plugin-apollo/dist/jbrowse-plugin-apollo.umd.development.js
packages/jbrowse-plugin-apollo/dist/jbrowse-plugin-apollo.umd.production.min.js
deploy:
name: Deploy to ${{ inputs.environment }} demo server
runs-on: ubuntu-latest
Expand Down

0 comments on commit e4c7594

Please sign in to comment.