Skip to content

fix: action checkout version error #51

fix: action checkout version error

fix: action checkout version error #51

Workflow file for this run

name: Build-Release
on:
push:
tags:
- "*"
jobs:
build-linux-amd64:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update && sudo apt install libqt6* libxcb-cursor-dev -y
python -m pip install --upgrade pip
pip install pyinstaller pyserial requests PyQt6 pyyaml
- name: Build with PyInstaller
run: pyinstaller release_linux.spec
- name: Archive build artifacts
uses: actions/upload-artifact@v2
with:
name: build-artifacts
path: dist
- name: Copy Bin For Docker
run: mkdir dist-for-docker && cp $(ls -1 dist/*) dist-for-docker/fishbot_tool_linux_amd64
- name: Archive build artifacts docker
uses: actions/upload-artifact@v2
with:
name: build-artifacts-for-docker
path: dist-for-docker
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller pyserial requests PyQt6 pyyaml
- name: Build with PyInstaller
run: pyinstaller release_win.spec
- name: Archive build artifacts
uses: actions/upload-artifact@v2
with:
name: build-artifacts
path: dist
build-cli-version:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Copy file to dist
run: mkdir dist && mv fishbot_tool_cli.py dist/
- name: Archive build artifacts
uses: actions/upload-artifact@v2
with:
name: build-artifacts
path: dist
build-release-docker:
runs-on: ubuntu-latest
needs: [build-linux-amd64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download built artifacts
uses: actions/download-artifact@v2
with:
name: build-artifacts-for-docker
path: ./dist-for-docker
- name: Docker login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build And Publish Docker image
run: /bin/bash release_docker.sh
release:
runs-on: ubuntu-22.04
needs: [build-release-docker, build-windows, build-cli-version]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download built artifacts
uses: actions/download-artifact@v2
with:
name: build-artifacts
path: ./dist
- name: Update release notes
run: |
echo "sed -i 's/DOCKER-TAG/$GITHUB_REF_NAME/g' ./release-notes.md" > change_tag.sh
/bin/bash change_tag.sh
- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ env.REF_NAME }}
name: ${{ env.REF_NAME }}
body_path: release-notes.md
token: ${{ secrets.ACCESS_TOKEN }}
draft: false
prerelease: false
files: |
dist/*