Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
LinneyS committed Mar 17, 2023
2 parents 4d69db1 + 6b30f45 commit b3b57b0
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Artifact

on:
workflow_dispatch:
pull_request:
types: [opened, reopened]
branches: [master]

jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Get Info
run: |
echo "version=$(grep -Eo '[0-9]+(\.[0-9]+)+' CHANGELOG.md | head -n 1)" >> $GITHUB_OUTPUT
id: info
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Install Dependencies
run: |
python3 -m pip install --upgrade build
pip install -r requirements.txt
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
rm -rf ./.git/
rm .gitignore
rm .gitmodules
python3 -m build
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: onlyoffice.plone-${{ steps.info.outputs.version }}
path: ${{ github.workspace }}/dist/onlyoffice.plone-${{ steps.info.outputs.version }}.tar.gz
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release

on:
push:
branches: [master]

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Get Info
run: |
echo "version=$(grep -Eo '[0-9]+(\.[0-9]+)+' CHANGELOG.md | head -n 1)" >> $GITHUB_OUTPUT
id: info
- name: Generate Changelog
run: |
awk '/## [0-9]/{p++} p; /## [0-9]/{if (p > 1) exit}' CHANGELOG.md | awk 'NR>2 {print last} {last=$0}' > RELEASE.md
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Install Dependencies
run: |
python3 -m pip install --upgrade build
pip install -r requirements.txt
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
rm -rf ./.git/
rm .gitignore
rm .gitmodules
python3 -m build
- name: Create Release
uses: ncipollo/release-action@v1
id: create_release
with:
artifacts: "${{ github.workspace }}/dist/onlyoffice.plone-${{ steps.info.outputs.version }}.tar.gz"
bodyFile: RELEASE.md
tag: v${{ steps.info.outputs.version }}

0 comments on commit b3b57b0

Please sign in to comment.