Skip to content

Mock #6

Mock #6 #8

Workflow file for this run

name: Create Release
on:
pull_request:
branches:
- main
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get Pull Request Body
id: pr_body
run: |
BODY=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
${{ github.api_url }}/repos/${{ github.repository }}/pulls/${{ github.event.number }} \
| jq -r '.body')
echo "::set-output name=body::$BODY"
echo "Pull Request Body: $BODY" # Debug message
- name: Increment Version
id: increment_version
run: |
VERSION_CHANGES=$(bash ./scripts/version.sh "${{ steps.pr_body.outputs.body }}")
echo "::set-output name=version_changes::$VERSION_CHANGES"
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install Bun dependencies
run: bun install
- name: Export project using Bun
run: bun export
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.number }}-${{ steps.increment_version.outputs.version }}
release_name: Release ${{ steps.increment_version.outputs.version }}
body: |
Changes in this Release:
${{ steps.increment_version.outputs.version_changes }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist.zip
asset_name: cesium.zip
asset_content_type: application/zip