Skip to content

Commit

Permalink
Merge pull request #10 from DangoTown/dev
Browse files Browse the repository at this point in the history
Release 6.1
  • Loading branch information
yokinanya authored Jul 22, 2024
2 parents ba36182 + ebb1570 commit df8f19e
Showing 1 changed file with 41 additions and 39 deletions.
80 changes: 41 additions & 39 deletions .github/workflows/ci_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
branches:
- main
types:
types:
- closed

jobs:
Expand All @@ -13,41 +13,43 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "14"

- name: Extract version from PR title
id: extract_version
run: echo "::set-output name=version::$(echo ${GITHUB_EVENT_PULL_REQUEST_TITLE} | sed 's/Release //')"

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.extract_version.outputs.version }}
release_name: Release ${{ steps.extract_version.outputs.version }}
body: |
This is the release description for version ${{ steps.extract_version.outputs.version }}.
draft: false
prerelease: false

- name: Create zip file
run: |
zip -r DGTExtra_datapack_${{ steps.extract_version.outputs.version }}.zip data LICENSE pack.mcmeta pack.png README.md
- 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: ./DGTExtra_datapack_${{ steps.extract_version.outputs.version }}.zip
asset_name: DGTExtra_datapack_${{ steps.extract_version.outputs.version }}.zip
asset_content_type: application/zip
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Extract version from PR title
id: extract_version
run: |
VERSION=$(echo "${{ github.event.pull_request.title }}" | sed 's/Release //')
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
body: |
This is the release description for version ${{ env.VERSION }}.
draft: false
prerelease: false

- name: Create zip file
run: |
zip -r DGTExtra_datapack_${{ env.VERSION }}.zip data LICENSE pack.mcmeta pack.png README.md
- 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: ./DGTExtra_datapack_${{ env.VERSION }}.zip
asset_name: DGTExtra_datapack_${{ env.VERSION }}.zip
asset_content_type: application/zip

0 comments on commit df8f19e

Please sign in to comment.