Skip to content

fix relesae action

fix relesae action #16

Workflow file for this run

name: build_archive
on:
push:
branches-ignore:
- '**'
tags:
- '**'
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
jobs:
archive:
runs-on: ubuntu-latest
steps:
- name: Set version
id: version
run: |
REPOSITORY=$(echo ${{ github.repository }} | sed -e "s#.*/##")
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")
echo "version=$VERSION" >> $GITHUB_ENV
echo "filename=$REPOSITORY-$VERSION" >> $GITHUB_ENV
echo "plugin=$REPOSITORY" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Archive
run: |
cd ..; zip -r ${{ env.filename }}.zip ${{ env.plugin }}/ -x "*.git*"; mv ${{ env.filename }}.zip ${{ env.plugin }}/
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.version }}
release_name: ${{ env.version }}
body: ''
draft: false
prerelease: true
- name: Upload Release Asset
id: 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: ${{ env.filename }}.zip
asset_name: ${{ env.filename }}.zip
asset_content_type: application/zip