Skip to content

Commit

Permalink
chore(ci): use cli to release (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
HeRaNO committed Jun 17, 2024
1 parent 78a6e00 commit 3000aa5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 37 deletions.
26 changes: 7 additions & 19 deletions .github/workflows/auto-release-typst.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,11 @@ jobs:
echo "tag_name=$tag_name" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.create_tag.outputs.tag_name }}
release_name: Release ${{ steps.create_tag.outputs.tag_name }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload_release_asset
uses: actions/upload-release-asset@v1
shell: bash
run: |
set -x
mv ./oi-wiki-export-typst/oi-wiki-export.pdf ./OI-wiki.pdf
gh release create "${{ steps.create_tag.outputs.tag_name }}" ./OI-wiki.pdf
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./oi-wiki-export-typst/oi-wiki-export.pdf
asset_name: OI-wiki.pdf
asset_content_type: application/pdf
GH_TOKEN: ${{ github.token }}
RELEASE_NAME: "Release ${{ steps.create_tag.outputs.tag_name }}"
25 changes: 7 additions & 18 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,11 @@ jobs:
git push --tags
echo "tag_name=$tag_name" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.create_tag.outputs.tag_name }}
release_name: Release ${{ steps.create_tag.outputs.tag_name }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload_release_asset
uses: actions/upload-release-asset@v1
shell: bash
run: |
set -x
mv ./oi-wiki-export/oi-wiki-export.pdf ./OI-wiki.pdf
gh release create "${{ steps.create_tag.outputs.tag_name }}" ./OI-wiki.pdf
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./oi-wiki-export/oi-wiki-export.pdf
asset_name: OI-wiki.pdf
asset_content_type: application/pdf
GH_TOKEN: ${{ github.token }}
RELEASE_NAME: "Release ${{ steps.create_tag.outputs.tag_name }}"

0 comments on commit 3000aa5

Please sign in to comment.