2022-11-29 23:50:31 +00:00
|
|
|
# Runs on releases
|
|
|
|
|
|
|
|
name: Publish release notes
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [ published ]
|
|
|
|
|
2024-03-24 22:11:16 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-11-29 23:50:31 +00:00
|
|
|
jobs:
|
|
|
|
|
|
|
|
stable:
|
|
|
|
runs-on: ubuntu-latest
|
2022-12-21 12:00:23 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-11-29 23:50:31 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout Code
|
2023-10-24 22:18:53 +00:00
|
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1
|
2022-11-29 23:50:31 +00:00
|
|
|
- name: Version Check
|
|
|
|
run: |
|
2024-04-02 06:35:01 +00:00
|
|
|
pip install requests==2.31.0
|
2022-11-29 23:50:31 +00:00
|
|
|
python3 ci/version_check.py
|
|
|
|
- name: Push to Stable Branch
|
2023-10-24 22:18:53 +00:00
|
|
|
uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df # pin@v0.8.0
|
2022-11-29 23:50:31 +00:00
|
|
|
if: env.stable_release == 'true'
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: stable
|
|
|
|
force: true
|
2023-07-20 00:12:08 +00:00
|
|
|
|
|
|
|
publish-build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-10-24 22:18:53 +00:00
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1
|
2023-07-20 00:12:08 +00:00
|
|
|
- name: Environment Setup
|
|
|
|
uses: ./.github/actions/setup
|
|
|
|
with:
|
|
|
|
npm: true
|
|
|
|
- name: Install dependencies
|
|
|
|
run: cd src/frontend && yarn install
|
|
|
|
- name: Build frontend
|
2024-03-19 21:58:50 +00:00
|
|
|
run: cd src/frontend && npm run compile && npm run build
|
2023-07-20 00:12:08 +00:00
|
|
|
- name: Zip frontend
|
|
|
|
run: |
|
|
|
|
cd InvenTree/web/static/web
|
|
|
|
zip -r ../frontend-build.zip *
|
2024-03-20 23:58:46 +00:00
|
|
|
- uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # pin@2.9.0
|
2023-07-20 00:12:08 +00:00
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
file: InvenTree/web/static/frontend-build.zip
|
|
|
|
asset_name: frontend-build.zip
|
|
|
|
tag: ${{ github.ref }}
|
|
|
|
overwrite: true
|