Skip to content

Commit

Permalink
Use gh actions for tag releases
Browse files Browse the repository at this point in the history
  • Loading branch information
noisekit committed Oct 11, 2023
1 parent 95c9988 commit 9a4d9d1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 91 deletions.
98 changes: 7 additions & 91 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,61 +239,8 @@ jobs:
ipfs-cluster-api: 'https://ipfs.synthetix.io/api/v0'
ipns-key: 'v3.synthetix.eth'

release:
parameters:
release-branch:
type: string
working_directory: ~/app
docker:
- image: cimg/node:<< pipeline.parameters.node-version >>
environment:
- GIT_PAGER: cat
steps:
- run: git config --global user.email engineering@snxdao.io
- run: git config --global user.name synthetix-team
- run: mkdir -p ~/.ssh
- run: ssh-keyscan github.com >> ~/.ssh/known_hosts
- run:
working_directory: ~/
command: git clone git@github.com:synthetixio/v3ui.git --verbose --no-tags app
- run: git checkout $CIRCLE_SHA1
- run: git branch << parameters.release-branch >>
- run: git checkout << parameters.release-branch >>
- run: git push --set-upstream --force origin << parameters.release-branch >>

debug:
docker:
- image: cimg/node:<< pipeline.parameters.node-version >>
steps:
- run: echo "pipeline.git.branch = << pipeline.git.branch >>"
- run: echo "pipeline.git.tag = << pipeline.git.tag >>"
- run: echo "pipeline.git.revision = << pipeline.git.revision >>"
- run: echo "pipeline.git.base_revision = << pipeline.git.base_revision >>"
- run: echo "pipeline.project.git_url = << pipeline.project.git_url >>"

workflows:
debug:
when:
and:
- not:
or:
- equal: ['tagged-releases', << pipeline.git.branch >>]
- equal: ['release/lp', << pipeline.git.branch >>]
- equal: ['test-release/lp', << pipeline.git.branch >>]
jobs:
- debug

ui:
when:
and:
- not: << pipeline.git.tag >>
- << pipeline.git.branch >>
- not:
or:
- equal: ['tagged-releases', << pipeline.git.branch >>]
- equal: ['release/lp', << pipeline.git.branch >>]
- equal: ['test-release/lp', << pipeline.git.branch >>]

jobs:
- checks
- typecheck
Expand All @@ -305,50 +252,19 @@ workflows:
- staking-e2e:
chain: optimism-goerli
name: staking-e2e-optimism-goerli
- staking-ipfs:
requires: [checks, typecheck, tests, staking-cy, staking-e2e-optimism-mainnet]
filters:
branches:
only:
- release
- master
- ipfs-deploy
- combine-coverage:
requires: [tests, staking-cy, staking-e2e-optimism-mainnet]

release-lp:
when:
and:
- matches:
pattern: '^release-lp.*'
value: << pipeline.git.tag >>
# - not: << pipeline.git.branch >> # tags pushed have no branch
# - equal: ['tagged-releases', << pipeline.git.branch >>]
jobs:
- checks
- typecheck
- tests
- staking-cy
- staking-e2e:
chain: optimism-mainnet
name: staking-e2e-optimism-mainnet
- staking-e2e:
chain: optimism-goerli
name: staking-e2e-optimism-goerli
- release:
release-branch: 'release/lp'
- staking-ipfs:
requires:
- checks
- typecheck
- tests
- staking-cy
- staking-e2e-optimism-mainnet
- staking-e2e-optimism-goerli

test-release-lp:
when:
and:
- equal: ['tagged-releases', << pipeline.git.branch >>]
jobs:
- release:
release-branch: 'test-release/lp'
filters:
branches:
only:
- release
- master
- ipfs-deploy
27 changes: 27 additions & 0 deletions .github/workflows/release-lp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: release-lp

on:
push:
tags:
- 'release-lp*'
branches:
- 'tagged-releases'

jobs:
release-lp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git config --global user.email engineering@snxdao.io
- run: git config --global user.name synthetix-team
- name: Test commit
run: |
git commit --allow-empty --message "Test commit"
git push
# - run: git checkout "${{ github.sha }}"
# - run: git branch release/test
# - run: git checkout release/test
# - run: git push --set-upstream --force origin release/test

0 comments on commit 9a4d9d1

Please sign in to comment.