Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with excluding directory #23

Closed
Minionguyjpro opened this issue Jan 6, 2022 · 4 comments
Closed

Help with excluding directory #23

Minionguyjpro opened this issue Jan 6, 2022 · 4 comments

Comments

@Minionguyjpro
Copy link

I have an build directory, which i want to hide. I am archiving a chrome extension into a zip and want to exclude the build directory.
This is my current workflow YAML:

name: CI

on:
  push:
  pull_request:

jobs:
 build:
    runs-on: windows-latest
    steps:
     - uses: actions/checkout@v2
     - name: Create report file
       run: date +%s > report.txt
       
     - name: Delete old Archive
       run: del "D:\a\Sidebar\Sidebar\Build\Sidebar_latest.zip"
       shell: cmd
    
     - name: Archive Release
       uses: thedoctor0/zip-release@master
       with:
         type: 'zip'
         filename: 'Sidebar_latest.zip'
         exclusions: '*.git* /*Build/* README.md report.txt'

     - name: Move to "Build" directory
       run: move /y D:\a\Sidebar\Sidebar\Sidebar_latest.zip D:\a\Sidebar\Sidebar\Build\
       shell: cmd
       
     - name: Commit report
       run: |
          git config --global user.name 'Minionguyjpro'
          git config --global user.email 'minionguyjpro@users.noreply.github.com'
          git add -A
          git commit -am "Made new build"
          git push
@Minionguyjpro
Copy link
Author

Nevermind i found out how

@m4ttheweric
Copy link

m4ttheweric commented Apr 5, 2022

@Minionguyjpro can you share ? I am also having some issues with excluding a dir

@Minionguyjpro
Copy link
Author

@Minionguyjpro can you share ? I am also having some issues with excluding a dir

Of course, here it is:

name: Build a ZIP and CRX version

on:
  push:

jobs:
 build:
    runs-on: windows-latest
    steps:   
     - uses: actions/checkout@v2
     - name: Create report file
       run: date +%s > report.txt
       
     - name: Delete old ZIP and CRX
       run: del "D:\a\Sidebar\Sidebar\build\Sidebar_latest.zip"
    
     - name: Archive Release
       uses: thedoctor0/zip-release@master
       with:
         type: 'zip'
         filename: 'Sidebar_latest.zip'
         exclusions: '*.git* ./build/ README.md report.txt'

     - name: Move to "build" directory
       run: move /y D:\a\Sidebar\Sidebar\Sidebar_latest.zip D:\a\Sidebar\Sidebar\build\
       shell: cmd

     - name: Build CRX
       run: copy /y D:\a\Sidebar\Sidebar\build\Sidebar_latest.zip D:\a\Sidebar\Sidebar\build\Sidebar_latest.crx
       shell: cmd
       
     - name: Upload Sidebar ZIP Build Artifact
       uses: actions/upload-artifact@v2
       with:
         name: Sidebar Latest Beta ZIP
         path: D:\a\Sidebar\Sidebar\build\Sidebar_latest.zip
         
     - name: Upload Sidebar CRX Build Artifact
       uses: actions/upload-artifact@v2
       with:
         name: Sidebar Latest Beta CRX
         path: D:\a\Sidebar\Sidebar\build\Sidebar_latest.crx
       
     - name: Commit report
       run: |
          git config --global user.name '${{ secrets.git_username }}'
          git config --global user.email '${{ secrets.git_email }}'
          git add -A
          git commit -am "Made new build"
          git push       

@Minionguyjpro
Copy link
Author

I changed /*build/* to ./build/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants