chore: bump version to 3.5.2 and update dependencies in package.json … #557
Workflow file for this run
This file contains hidden or 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: Release | |
| permissions: | |
| contents: write | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - "main" | |
| tags: | |
| - "v*.*.*" | |
| jobs: | |
| build_plugin: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: archlinux:latest | |
| steps: | |
| - name: set git global safe directory | |
| run: | | |
| pacman -Syu git npm tree zip unzip upx --noconfirm | |
| git config --global --add safe.directory $(realpath .) | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| # - name: update submodules | |
| # run: git submodule update --init --recursive | |
| - name: build RyzenAdj | |
| run: | | |
| pacman -S base-devel pciutils cmake --noconfirm --needed --overwrite='*' | |
| cd submodule/RyzenAdj | |
| mkdir build && cd build | |
| cmake -DCMAKE_BUILD_TYPE=Release .. | |
| make | |
| upx -9 ryzenadj | |
| cp -f ryzenadj ../../../bin | |
| # - name: build python-fuse | |
| # run: | | |
| # PWD=$(pwd) | |
| # echo "PWD: $PWD" | |
| # mkdir -p py_modules/site-packages | |
| # pacman -S python-fuse python-setuptools python-wheel python-installer rsync --noconfirm --needed --overwrite='*' | |
| # cd ${PWD}/submodule/python-fuse && \ | |
| # PYTHONPATH=${PWD}/py_modules/site-packages \ | |
| # python3 setup.py install --prefix=${PWD} --install-lib=install | |
| # cd - | |
| # rsync -av --progress --exclude=*.pyc --exclude=__pycache__ ./submodule/python-fuse/install/fuse*/fuse* ./py_modules/site-packages/ | |
| - name: change log level | |
| run: | | |
| sed -i 's/logging.DEBUG/logging.INFO/' py_modules/config.py | |
| - name: build plugin | |
| run: | | |
| npm i -g pnpm | |
| pnpm install --no-frozen-lockfile | |
| pnpm update | |
| pnpm run build | |
| rm -f dist/*.js.map | |
| tar -czvf PowerControl.tar.gz --transform 's,^,PowerControl/,' dist backend py_modules bin *.py *.json *.md *.js LICENSE | |
| # zip | |
| mkdir -p PowerControl | |
| cp -r dist backend py_modules bin *.py *.json *.md *.js LICENSE PowerControl | |
| zip -r PowerControl.zip PowerControl | |
| rm -rf PowerControl | |
| - name: show files | |
| run: | | |
| tar -tzvf PowerControl.tar.gz | |
| unzip -l PowerControl.zip | |
| - name: Publish Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: PowerControl | |
| path: | | |
| PowerControl.tar.gz | |
| PowerControl.zip | |
| publish: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| needs: build_plugin | |
| steps: | |
| - run: mkdir /tmp/artifacts | |
| - name: download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: /tmp/artifacts | |
| - run: ls -R /tmp/artifacts | |
| - name: publish to github release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| /tmp/artifacts/PowerControl/PowerControl.tar.gz | |
| /tmp/artifacts/PowerControl/PowerControl.zip | |
| tag_name: ${{ github.ref_name }} | |
| draft: false | |
| generate_release_notes: true | |
| prerelease: contains(github.ref, 'pre') | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |