Skip to content

Merge pull request #73 from mengmeet/dev #241

Merge pull request #73 from mengmeet/dev

Merge pull request #73 from mengmeet/dev #241

Workflow file for this run

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 --noconfirm
git config --global --add safe.directory $(realpath .)
- uses: actions/checkout@v3
- name: build plugin
run: |
npm i -g pnpm@8.5.1
pnpm install --no-frozen-lockfile
pnpm update
pnpm run build
tar -czvf PowerControl.tar.gz --transform 's,^,PowerControl/,' dist backend bin *.py *.json *.md *.js LICENSE
- name: show files
run: |
tar -tzvf PowerControl.tar.gz
- name: Publish Artifacts
uses: actions/upload-artifact@v2
with:
name: PowerControl
path: PowerControl.tar.gz
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@v3
with:
path: /tmp/artifacts
- run: ls -R /tmp/artifacts
- name: publish to github release
uses: softprops/action-gh-release@v1
with:
files: /tmp/artifacts/PowerControl/PowerControl.tar.gz
tag_name: ${{ github.ref_name }}
draft: false
generate_release_notes: true
prerelease: contains(github.ref, 'pre')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}