Skip to content

Commit

Permalink
fix: try to use new workflow syntax thingy
Browse files Browse the repository at this point in the history
  • Loading branch information
DvdPlaat committed Feb 9, 2024
1 parent 0ca7e32 commit f1c6dd9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
- name: Determine next edition
id: determine-edition
run: |
echo "::set-output name=EDITION:$(($(git describe --tags --abbrev=0) +1))"
echo "EDITION=$(($(git describe --tags --abbrev=0) +1))" >> "$GITHUB_ENV"
- name: Check if edition exists
id: check-edition
run: |
if curl -I "https://mailchi.mp/hackernewsletter/${{ steps.determine-edition.outputs.EDITION }}" | grep -q "200 OK"; then
if curl -I "https://mailchi.mp/hackernewsletter/$EDITION" | grep -q "200 OK"; then
echo "Edition exists, continuing workflow."
else
echo "Edition does not exist, exiting workflow." && exit 1
Expand All @@ -34,12 +34,12 @@ jobs:
run: playwright install chromium

- name: Execute Python script
run: python generator.py ${{ steps.determine-edition.outputs.EDITION }}
run: python generator.py $EDITION

- name: Setup Tectonic
uses: WtfJoke/setup-tectonic@v2.1.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: $EDITION

- name: Print Tectonic version
run: tectonic --version
Expand All @@ -48,7 +48,7 @@ jobs:
run: tectonic output.tex

- name: Rename output.pdf
run: mv output.pdf HackerNewsPaper-${{ steps.determine-edition.outputs.EDITION }}.pdf
run: mv output.pdf HackerNewsPaper-$EDITION.pdf

- name: Upload a Build Artifact
if: always()
Expand All @@ -60,8 +60,8 @@ jobs:
uses: ncipollo/release-action@v1.13.0
with:
allowUpdates: true
tag: ${{ steps.determine-edition.outputs.EDITION }}
name: "HackerNewsPaper #${{ steps.determine-edition.outputs.EDITION }}"
body: "HackerNewsPaper #${{ steps.determine-edition.outputs.EDITION }}"
artifacts: "HackerNewsPaper-${{ steps.determine-edition.outputs.EDITION }}.pdf"
tag: $EDITION
name: "HackerNewsPaper #$EDITION"
body: "HackerNewsPaper #$EDITION"
artifacts: "HackerNewsPaper-$EDITION.pdf"
removeArtifacts: true

0 comments on commit f1c6dd9

Please sign in to comment.