Skip to content

Commit 928e704

Browse files
committed
Update workflow
1 parent 13e0ad1 commit 928e704

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,20 @@ jobs:
77
check_version:
88
runs-on: ubuntu-latest
99
outputs:
10-
is_new_version: ${{steps.git-check.outputs.modified}}
10+
is_new_version: ${{steps.git-check.outputs.new-ver}}
1111
new_version: ${{steps.save-version.outputs.ver-number}}
1212
steps:
1313
- uses: actions/checkout@v2
1414
- name: Fetch release version
15-
run: |
16-
curl -sL https://api.github.com/repos/devicons/devicon/releases/latest | \
17-
jq -r ".tag_name" > devicon-latest.txt
18-
- name: Check for modified files
15+
run: echo ::set-output name=ver-number::$(curl -sL https://api.github.com/repos/devicons/devicon/releases/latest | jq -r ".tag_name")
16+
- name: Check for newest version
1917
id: git-check
20-
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
18+
run: echo ::set-output name=new-ver::$([$(curl -sL https://api.github.com/repos/maltejur/react-devicons/releases/latest | jq -r ".tag_name") = $(cat devicon-latest.txt) ] && echo "true" || echo "false" )
2119
- name: Save new version number
2220
id: save-version
23-
run: echo ::set-output name=ver-number::$(cat cat devicon-latest.txt)
21+
run: echo ::set-output name=ver-number::$(cat devicon-latest.txt)
2422
- run: echo ${{steps.git-check.outputs.modified}} && echo ${{steps.save-version.outputs.ver-number}}
25-
release:
23+
publish:
2624
needs: check_version
2725
if: needs.jobs.outputs.is_new_version == 'true'
2826
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)