mirror of
https://github.com/QwIT-Development/firka-extension.git
synced 2026-06-12 03:41:39 +02:00
update build
This commit is contained in:
119
.github/workflows/build.yml
vendored
119
.github/workflows/build.yml
vendored
@@ -1,71 +1,82 @@
|
|||||||
name: Package and Release Extension
|
name: Build and Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
inputs:
|
||||||
branches:
|
version:
|
||||||
- test
|
description: 'Release version (pl. v1.0.0)'
|
||||||
|
required: true
|
||||||
|
default: 'v1.0.0'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-release:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Get current date
|
- name: Set up build directories
|
||||||
id: date
|
|
||||||
run: |
|
run: |
|
||||||
echo "DATE=$(date +'%Y.%m.%d. %H:%M')" >> $GITHUB_ENV
|
mkdir -p build/chrome
|
||||||
echo "DATE_FOR_ZIP=$(date +'%Y%m%d-%H%M')" >> $GITHUB_ENV
|
mkdir -p build/firefox
|
||||||
|
|
||||||
- name: Create ZIP file
|
- name: Copy files – Chrome
|
||||||
run: |
|
run: |
|
||||||
zip -r "pre-firxa-${{ env.DATE_FOR_ZIP }}.zip" . -x "*.git*" "*.github*" "*.idea*"
|
rsync -av \
|
||||||
|
--exclude='.git' \
|
||||||
|
--exclude='.gitea' \
|
||||||
|
--exclude='README*' \
|
||||||
|
--exclude='readme*' \
|
||||||
|
--exclude='LICENSE*' \
|
||||||
|
--exclude='license*' \
|
||||||
|
--exclude='*.md' \
|
||||||
|
--exclude='build/' \
|
||||||
|
. build/chrome/
|
||||||
|
|
||||||
- name: Delete previous pre-release
|
- name: Copy files – Firefox
|
||||||
uses: dev-drprasad/delete-tag-and-release@v0.2.1
|
run: |
|
||||||
with:
|
rsync -av \
|
||||||
delete_release: true
|
--exclude='.git' \
|
||||||
tag_name: pre-release
|
--exclude='.gitea' \
|
||||||
env:
|
--exclude='README*' \
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
--exclude='readme*' \
|
||||||
continue-on-error: true
|
--exclude='LICENSE*' \
|
||||||
|
--exclude='license*' \
|
||||||
|
--exclude='*.md' \
|
||||||
|
--exclude='build/' \
|
||||||
|
. build/firefox/
|
||||||
|
|
||||||
- name: Create new pre-release
|
- name: Prepare Chrome build
|
||||||
id: create_release
|
run: |
|
||||||
uses: softprops/action-gh-release@v1
|
rm -f build/chrome/manifest_fox.json
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
- name: Prepare Firefox build
|
||||||
|
run: |
|
||||||
|
rm -f build/firefox/manifest.json
|
||||||
|
mv build/firefox/manifest_fox.json build/firefox/manifest.json
|
||||||
|
|
||||||
|
- name: Create ZIP archives
|
||||||
|
run: |
|
||||||
|
cd build/chrome
|
||||||
|
zip -r ../../firka-extension-chrome-${{ github.event.inputs.version }}.zip .
|
||||||
|
cd ../firefox
|
||||||
|
zip -r ../../firka-extension-firefox-${{ github.event.inputs.version }}.zip .
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
uses: actions/gitea-release@v1
|
||||||
with:
|
with:
|
||||||
tag_name: pre-release
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
release_name: Fejlesztői build
|
tag_name: ${{ github.event.inputs.version }}
|
||||||
|
release_name: ${{ github.event.inputs.version }}
|
||||||
body: |
|
body: |
|
||||||
Ez egy kiadás előtti build, amely minden egyes commit után frissül!
|
## Firka Extension ${{ github.event.inputs.version }}
|
||||||
A build automatikusan készült ekkor: ${{ env.DATE }}
|
|
||||||
|
### Letöltések
|
||||||
|
- **Chrome / Chromium** – `firka-extension-chrome-${{ github.event.inputs.version }}.zip`
|
||||||
|
- **Firefox** – `firka-extension-firefox-${{ github.event.inputs.version }}.zip`
|
||||||
|
files: |
|
||||||
|
firka-extension-chrome-${{ github.event.inputs.version }}.zip
|
||||||
|
firka-extension-firefox-${{ github.event.inputs.version }}.zip
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: true
|
prerelease: false
|
||||||
|
|
||||||
- name: Upload ZIP to release
|
|
||||||
if: steps.create_release.outputs.upload_url != ''
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./pre-firxa-${{ env.DATE_FOR_ZIP }}.zip
|
|
||||||
asset_name: pre-firxa-${{ env.DATE_FOR_ZIP }}.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|
||||||
check-links:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Link Checker
|
|
||||||
id: lychee
|
|
||||||
uses: lycheeverse/lychee-action@v2
|
|
||||||
with:
|
|
||||||
fail: false
|
|
||||||
|
|||||||
Reference in New Issue
Block a user