2022-02-17 04:36:26 +00:00
|
|
|
name: Release
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "*"
|
|
|
|
|
2024-10-14 02:46:59 +00:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
2022-02-17 04:36:26 +00:00
|
|
|
jobs:
|
|
|
|
setup:
|
2022-04-01 06:27:15 +00:00
|
|
|
if: github.event.base_ref == 'refs/heads/master'
|
2022-02-17 04:36:26 +00:00
|
|
|
name: Setup
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
2024-10-14 02:46:59 +00:00
|
|
|
version: ${{ steps.get_version.outputs.version }}
|
2022-02-17 04:36:26 +00:00
|
|
|
steps:
|
2024-10-14 02:46:59 +00:00
|
|
|
- name: Get version
|
|
|
|
id: get_version
|
|
|
|
run: echo version=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT
|
2022-02-17 04:36:26 +00:00
|
|
|
|
2024-10-08 02:29:00 +00:00
|
|
|
container:
|
|
|
|
name: Build and upload container
|
|
|
|
needs:
|
|
|
|
- setup
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- uses: mr-smithers-excellent/docker-build-push@v5
|
|
|
|
name: Build & push the Docker image
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ secrets.GHCR_USER }}
|
|
|
|
password: ${{ secrets.GHCR_TOKEN }}
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
image: video2x
|
2024-10-14 02:46:59 +00:00
|
|
|
tags: latest, ${{ needs.setup.outputs.version }}
|
2024-10-08 02:29:00 +00:00
|
|
|
|
2022-02-17 04:36:26 +00:00
|
|
|
create-release:
|
|
|
|
name: Create release
|
|
|
|
needs:
|
|
|
|
- setup
|
2024-10-08 02:29:00 +00:00
|
|
|
- container
|
2022-02-17 04:36:26 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
steps:
|
|
|
|
- name: Create release
|
|
|
|
id: create_release
|
2024-10-14 02:46:59 +00:00
|
|
|
uses: softprops/action-gh-release@v2
|
2022-02-17 04:36:26 +00:00
|
|
|
with:
|
2024-10-14 02:46:59 +00:00
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
tag_name: ${{ needs.setup.outputs.version }}
|
2024-10-26 00:00:00 +00:00
|
|
|
name: ${{ needs.setup.outputs.version }}
|
2022-02-17 04:36:26 +00:00
|
|
|
draft: true
|
|
|
|
prerelease: false
|