Skip to content

v1.1.3

v1.1.3 #6

Workflow file for this run

name: release
on:
release:
types:
- released
jobs:
build-assets:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
include:
- os: ubuntu-latest
alias: linux
- os: windows-latest
alias: win
name: Build on ${{ matrix.os }} and upload release assets
runs-on: ${{ matrix.os }}
steps:
# Checkout repo
- uses: actions/checkout@v2
# Install node
- uses: actions/setup-node@v2
with:
node-version: 20
# Install deps
- run: npm install --no-audit
# Package app
- name: Package for distribution
run: npm run pack-${{ matrix.alias }}
# Upload release assets
- name: Upload assets to release ${{ github.event.release.tag_name }}
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./package/artifacts/ufc-ripper-${{ matrix.alias }}-x64.zip
# Upload Linux build to artifacts
- if: matrix.os == 'ubuntu-latest'
name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: linux-assets
path: package/linux/
docker-publish:
name: Publish image to Docker Hub
needs: build-assets
runs-on: ubuntu-latest
steps:
# Checkout repo
- name: Checkout
uses: actions/checkout@v3
# Download Linux build artifacts
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: linux-assets
path: package/linux/
# Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Authenticate Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Build docker image and push to Docker Hub repo
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64
push: true
tags: |
m4heshd/ufc-ripper:${{ github.event.release.tag_name }}
m4heshd/ufc-ripper:latest
# Update Docker Hub repo description
- name: Update repo description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: m4heshd/ufc-ripper
readme-filepath: ./docker/README.md
short-description: ${{ github.event.repository.description }}