Schedule - Release #123
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
name: "Schedule - Release" | |
on: | |
workflow_dispatch: {} | |
# Execute every Sunday at 00:00 UTC. | |
schedule: | |
- cron: "0 0 * * 0" | |
jobs: | |
update_draft: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate Token | |
uses: tibdex/github-app-token@v2 | |
id: generate-token | |
with: | |
app_id: "${{ secrets.TVORIES_APP_ID }}" | |
private_key: "${{ secrets.TVORIES_APP_PRIVATE_KEY }}" | |
- name: Get Latest Release | |
uses: InsonusK/[email protected] | |
id: last_release | |
with: | |
myToken: ${{ github.token }} | |
exclude_types: "prerelease|release" | |
view_top: 10 | |
- name: "Print result" | |
run: | | |
echo "id: ${{ steps.last_release.outputs.id }}" | |
echo "name: ${{ steps.last_release.outputs.name }}" | |
echo "tag_name: ${{ steps.last_release.outputs.tag_name }}" | |
echo "created_at: ${{ steps.last_release.outputs.created_atd }}" | |
echo "draft: ${{ steps.last_release.outputs.draft }}" | |
echo "prerelease: ${{ steps.last_release.outputs.prerelease }}" | |
- name: Publish Release | |
uses: eregon/publish-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} | |
with: | |
release_id: ${{ steps.last_release.outputs.id }} |