Skip to content

Commit

Permalink
feat: updated workflow syntax and dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: k4yt3x <[email protected]>
  • Loading branch information
k4yt3x committed Oct 13, 2024
1 parent f068dc9 commit 332b5d7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- dev
pull_request: {}
workflow_dispatch: {}

jobs:
ubuntu:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -44,6 +45,7 @@ jobs:
with:
name: video2x-nightly-linux-amd64
path: /tmp/install

windows:
runs-on: windows-latest
steps:
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ on:
tags:
- "*"

permissions:
contents: write

jobs:
setup:
if: github.event.base_ref == 'refs/heads/master'
name: Setup
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.get_tag.outputs.tag }}
version: ${{ steps.get_version.outputs.version }}
steps:
- name: Get tag
id: get_tag
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//}
- name: Get version
id: get_version
run: echo version=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT

container:
name: Build and upload container
Expand All @@ -32,7 +35,7 @@ jobs:
password: ${{ secrets.GHCR_TOKEN }}
dockerfile: Dockerfile
image: video2x
tags: latest, ${{ needs.setup.outputs.tag }}
tags: latest, ${{ needs.setup.outputs.version }}

create-release:
name: Create release
Expand All @@ -45,11 +48,10 @@ jobs:
steps:
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.setup.outputs.tag }}
release_name: Video2X ${{ needs.setup.outputs.tag }}
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ needs.setup.outputs.version }}
release_name: Video2X ${{ needs.setup.outputs.version }}
draft: true
prerelease: false

0 comments on commit 332b5d7

Please sign in to comment.