auto release #19
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: auto release | |
on: | |
workflow_run: | |
workflows: ["auto check"] | |
types: | |
- completed | |
branches: | |
- main | |
- master | |
jobs: | |
build: | |
name: auto release | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: install dependencies | |
run: sudo apt-get install p7zip-full | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: build nar | |
run: | | |
# Remove repository files | |
rm -rf .gitignore .gitmodules delete.txt .github .git LICENSE | |
# Remove specific directories from ghost/master/dic/system | |
rm -rf ghost/master/dic/system/.github | |
rm -rf ghost/master/dic/system/.vscode | |
# Remove specific files from ghost/master/dic/system | |
rm -rf ghost/master/dic/system/.git | |
rm -f ghost/master/dic/system/.gitattributes | |
rm -f ghost/master/dic/system/LICENSE | |
rm -f ghost/master/dic/system/README.md | |
# Create NAR file | |
7z a -tzip "yayame.nar" ./* | |
- name: create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.run_id }} | |
release_name: 自動リリース | |
body: | | |
エラーチェックで引っかからなかった時の自動リリースです | |
draft: false | |
prerelease: false | |
- name: upload nar | |
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: ./yayame.nar | |
asset_name: yayame.nar | |
asset_content_type: application/zip |