Skip to content

Commit

Permalink
Updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed Mar 10, 2021
1 parent 7627170 commit aad81ab
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ jobs:
- run: npm link

- name: Publish via Doctor
run: |
sampleRepo="https://github.com/estruyf/doctor-sample/tree/dev"
if [[ ${GITHUB_REF} == "refs/heads/main" ]]; then
sampleRepo="https://github.com/estruyf/doctor-sample"
run: |
git clone https://github.com/estruyf/doctor-sample
if [[ ${GITHUB_REF} != "refs/heads/main" ]]; then
git checkout dev
fi
git clone $sampleRepo
node ./scripts/prepare-sample.js
cd doctor-sample
Expand Down Expand Up @@ -116,12 +116,12 @@ jobs:

- name: Publish via Doctor
run: |
$sampleRepo="https://github.com/estruyf/doctor-sample/tree/dev"
If (${env:GITHUB_REF} -eq 'refs/heads/main') {
$sampleRepo="https://github.com/estruyf/doctor-sample"
git clone https://github.com/estruyf/doctor-sample
If (${env:GITHUB_REF} -ne 'refs/heads/main') {
git checkout dev
}
git clone $sampleRepo
node ./scripts/prepare-sample.js
cd doctor-sample
Expand Down Expand Up @@ -178,10 +178,11 @@ jobs:
shell: cmd

- name: Publish via Doctor
run: |
IF "%GITHUB_REF%"=="refs/heads/main" (SET sampleRepo="https://github.com/estruyf/doctor-sample") else (SET sampleRepo="https://github.com/estruyf/doctor-sample/tree/dev")
run: |
git clone https://github.com/estruyf/doctor-sample
IF "%GITHUB_REF%"!="refs/heads/main" (git checkout dev)
git clone %sampleRepo%
node ./scripts/prepare-sample.js
cd doctor-sample
Expand Down

0 comments on commit aad81ab

Please sign in to comment.