edit release.yml #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Reclist | |
on: | |
push: | |
branches: | |
- 'release/**' | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
# 1. 체크아웃 | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref_name }} | |
# 2. 버전 추출 | |
- name: Extract Version From Branch Name | |
id: extract_version | |
run: | | |
VERSION=${GITHUB_REF_NAME#release/} | |
echo "::set-output name=version::${VERSION}" | |
env: | |
GITHUB_REF_NAME: ${{ github.ref_name }} | |
# 3. zip 패키징 | |
- name: Package Reclist To Zip | |
run: | | |
mkdir temp | |
cp -r comment temp/comment | |
cp -r oto temp/oto | |
cp -r reclist temp/reclist | |
cp -r .assets/* temp/* | |
zip -r cmpx_reclist_${{ steps.extract_version.outputs.version }}.zip temp/* | |
# 4. 릴리즈 | |
- name: Upload Github Release | |
id: upload_github_release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: ${{ steps.extract_version.outputs.version }} | |
relase_name: ${{ steps.extract_version.outputs.version }} | |
body: 'To Be Updated..' | |
# 5. 리스트 업로드 | |
- name: Upload Github Release Assets | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload-url: ${{ steps.upload_github_release.outputs.upload_url }} | |
assets_path: ./cmpx_reclist_${{ steps.extract_version.outputs.version }}.zip | |
asset_name: cmpx_reclist_${{ steps.extract_version.outputs.version }}.zip | |
asset_content_type: application/zip |