2023-04-29 20:54:56 +02:00
|
|
|
name: Push on GitHub (REUSABLE)
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
VERSION:
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
PRERELEASE:
|
|
|
|
required: true
|
|
|
|
type: boolean
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
# Checkout
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
# Get PDF doc
|
|
|
|
- name: Get documentation
|
2023-08-15 11:44:27 +02:00
|
|
|
if: inputs.VERSION != 'testing'
|
2023-04-29 20:54:56 +02:00
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf
|
|
|
|
# Create tag
|
|
|
|
- uses: rickstaa/action-create-tag@v1
|
|
|
|
name: Create tag
|
2023-08-15 11:44:27 +02:00
|
|
|
if: inputs.VERSION != 'testing'
|
2023-04-29 20:54:56 +02:00
|
|
|
with:
|
|
|
|
tag: "v${{ inputs.VERSION }}"
|
|
|
|
message: "v${{ inputs.VERSION }}"
|
2023-05-02 11:50:02 +02:00
|
|
|
force_push_tag: true
|
2023-08-15 11:40:05 +02:00
|
|
|
# Create tag
|
|
|
|
- uses: rickstaa/action-create-tag@v1
|
|
|
|
name: Create tag
|
2023-08-15 11:44:27 +02:00
|
|
|
if: inputs.VERSION == 'testing'
|
2023-08-15 11:40:05 +02:00
|
|
|
with:
|
|
|
|
tag: "${{ inputs.VERSION }}"
|
|
|
|
message: "${{ inputs.VERSION }}"
|
|
|
|
force_push_tag: true
|
2023-04-29 20:54:56 +02:00
|
|
|
# Extract changelog
|
|
|
|
- name: Extract changelog
|
2023-08-15 11:44:27 +02:00
|
|
|
if: inputs.VERSION != 'testing'
|
2023-04-29 20:54:56 +02:00
|
|
|
id: getchangelog
|
2023-05-02 11:50:02 +02:00
|
|
|
run: |
|
|
|
|
content=$(awk -v n=2 '/##/{n--}; n > 0' CHANGELOG.md | grep -v '# Changelog' | grep -v '##' | sed '/^$/d')
|
|
|
|
content="${content//'%'/'%25'}"
|
|
|
|
content="${content//$'\n'/'%0A'}"
|
|
|
|
content="${content//$'\r'/'%0D'}"
|
|
|
|
echo "::set-output name=content::$content"
|
2023-04-29 20:54:56 +02:00
|
|
|
# Create release
|
|
|
|
- name: Create release
|
2023-08-15 11:44:27 +02:00
|
|
|
if: inputs.VERSION != 'testing'
|
2023-04-29 20:54:56 +02:00
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
body: |
|
|
|
|
Documentation : https://docs.bunkerweb.io/${{ inputs.VERSION }}/
|
|
|
|
|
|
|
|
Docker tags :
|
|
|
|
- `bunkerity/bunkerweb:${{ inputs.VERSION }}`
|
|
|
|
- `bunkerity/bunkerweb-scheduler:${{ inputs.VERSION }}`
|
|
|
|
- `bunkerity/bunkerweb-autoconf:${{ inputs.VERSION }}`
|
|
|
|
- `bunkerity/bunkerweb-ui:${{ inputs.VERSION }}`
|
|
|
|
|
|
|
|
Linux packages : https://packagecloud.io/app/bunkerity/bunkerweb/search?q=${{ inputs.VERSION }}&filter=all&dist=
|
|
|
|
|
|
|
|
Changelog :
|
2023-05-02 11:50:02 +02:00
|
|
|
${{ steps.getchangelog.outputs.content }}
|
2023-04-29 21:43:26 +02:00
|
|
|
draft: true
|
2023-04-29 20:54:56 +02:00
|
|
|
prerelease: ${{ inputs.PRERELEASE }}
|
|
|
|
name: v${{ inputs.VERSION }}
|
|
|
|
tag_name: v${{ inputs.VERSION }}
|
|
|
|
discussion_category_name: Announcements
|
2023-05-02 11:50:02 +02:00
|
|
|
files: BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf
|
2023-08-15 11:40:05 +02:00
|
|
|
# Create release
|
|
|
|
- name: Create release
|
2023-08-15 11:44:27 +02:00
|
|
|
if: inputs.VERSION == 'testing'
|
2023-08-15 11:40:05 +02:00
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
body: |
|
|
|
|
**The testing version of BunkerWeb should not be used in production, please use the latest stable version instead.**
|
|
|
|
|
|
|
|
Documentation : https://docs.bunkerweb.io/${{ inputs.VERSION }}/
|
|
|
|
|
|
|
|
Docker tags :
|
|
|
|
- `bunkerity/bunkerweb:${{ inputs.VERSION }}`
|
|
|
|
- `bunkerity/bunkerweb-scheduler:${{ inputs.VERSION }}`
|
|
|
|
- `bunkerity/bunkerweb-autoconf:${{ inputs.VERSION }}`
|
|
|
|
- `bunkerity/bunkerweb-ui:${{ inputs.VERSION }}`
|
|
|
|
|
|
|
|
Linux packages : https://packagecloud.io/app/bunkerity/bunkerweb/search?q=${{ inputs.VERSION }}&filter=all&dist=
|
|
|
|
draft: false
|
|
|
|
prerelease: ${{ inputs.PRERELEASE }}
|
|
|
|
name: Testing
|
|
|
|
tag_name: ${{ inputs.VERSION }}
|
2023-06-28 15:59:37 +02:00
|
|
|
|