Skip to content

Commit

Permalink
ci: jobs compatibility with release branch
Browse files Browse the repository at this point in the history
  • Loading branch information
mhofman committed Sep 21, 2023
1 parent 57685bd commit 41e426e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 22 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/after-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
branches:
# $default-branch
- master
- release-pismo
- 'release-*'
workflow_dispatch:

jobs:
build:
Expand Down Expand Up @@ -54,13 +55,20 @@ jobs:
run: npm whoami
- name: publish to NPM tag
run: |
if [ "${{ github.ref_name }}" = "release-pismo" ]; then
# A pismo dev release.
TAG=pismo-dev
else
# Just a dev release.
TAG=dev
fi
case $GITHUB_REF_NAME in
release-*)
# A pre-release.
TAG=${GITHUB_REF_NAME#release-}-dev
;;
master)
# A trunk dev release.
TAG=dev
;;
*)
# Some other dev release.
TAG=other-dev
;;
esac
# without concurrency until https://github.com/Agoric/agoric-sdk/issues/8091
yarn lerna publish --concurrency 1 --conventional-prerelease --canary --exact \
--dist-tag=$TAG --preid=$TAG-$(git rev-parse --short=7 HEAD) \
Expand Down Expand Up @@ -102,7 +110,7 @@ jobs:
- uses: nwtgck/actions-netlify@v1.1
with:
# Production deployment if a push or merged PR.
production-deploy: ${{github.event_name == 'push'}}
production-deploy: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
publish-dir: coverage/html
# SECURITY: we don't want to hand out the Github token to this action.
# github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ag-solo-xs.yml.DISABLED
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches:
# $default-branch
- master
- release-pismo
- 'release-*'

jobs:
xs-build:
Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
# $default-branch
- master
- release-pismo
- 'release-*'
tags:
- '@agoric/sdk@*'
workflow_dispatch:
Expand Down Expand Up @@ -139,16 +139,23 @@ jobs:
id: docker-tags
run: |
set -ex
SDK_TAG=$(echo "${{ github.ref_name }}" | sed -ne 's!^@agoric/sdk@!!p')
SDK_TAG=$(echo "$GITHUB_REF_NAME" | sed -ne 's!^@agoric/sdk@!!p')
case $SDK_TAG in
"")
if [ "${{ github.ref_name }}" = "release-pismo" ]; then
# A pismo dev release.
DOCKER_TAGS=pismo-dev
else
# Just a dev release.
DOCKER_TAGS=dev
fi
case $GITHUB_REF_NAME in
release-*)
# A pre-release.
DOCKER_TAGS=${GITHUB_REF_NAME#release-}-dev
;;
master)
# A trunk dev release.
DOCKER_TAGS=dev
;;
*)
# Some other dev release.
DOCKER_TAGS=other-dev
;;
esac
;;
*)
# A tagged SDK release.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches:
# $default-branch
- master
- release-pismo
- 'release-*'
pull_request:
merge_group:
permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-check-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
github.event_name != 'pull_request' || (
(
github.event.pull_request.base.ref == 'master' ||
github.event.pull_request.base.ref == 'release-pismo' ||
startsWith(github.event.pull_request.base.ref, 'release-') ||
github.event.pull_request.base.ref == 'beta'
) &&
github.event.pull_request.draft == false &&
Expand All @@ -37,7 +37,7 @@ jobs:
contains(github.event.pull_request.labels.*.name, 'force:integration') || (
(
github.event.pull_request.base.ref == 'master' ||
github.event.pull_request.base.ref == 'release-pismo' ||
startsWith(github.event.pull_request.base.ref, 'release-') ||
github.event.pull_request.base.ref == 'beta'
) &&
github.event.pull_request.draft == false &&
Expand Down

0 comments on commit 41e426e

Please sign in to comment.