create-release icon indicating copy to clipboard operation
create-release copied to clipboard

how to not include .github/workflow into the release

Open floriankuhlmann opened this issue 3 years ago • 2 comments

hi everybody,

not sure if i misunderstand something. but do you have any idea how to prevent the action from including the .github/workflows/ directory into the release-files?

i am using the workflow below. the files are removed in the second step but are later included in the release. any ideas how to setup my repository or actions?

thank you in advance, best florian

on:
  push:
    branches: [ master ]
#    tags:
#      - 'v*' ## Push events to matching v*, i.e. v1.0, v20.15.10

name: Create Release

jobs:
  build:
    name: Create Release
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Remove projectfiles and dirs
        run: |
          ls -lsa
          rm -R .github .gitignore .DS_Store
          ls -lsa
        shell: bash

      - name: Create Release
        id: create_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
        with:
          tag_name: ${{ github.ref }}
          release_name: Release ${{ github.ref }}
          body: |
            First Beta Release for the plugin
            - still in development, please do not use without contacting us
          draft: false
          prerelease: false

floriankuhlmann avatar Feb 04 '21 16:02 floriankuhlmann

The step Create Release has nothing to do with the two steps above since the code has no change in your repository. You could just delete them. You could generate a new branch without .github files and release this branch.

nICEnnnnnnnLee avatar Feb 10 '21 15:02 nICEnnnnnnnLee

The shell: bash is redundant as that is Ubuntu's default shell. draft: false and prerelease: false are also redundant since they're set to their defaults.

Margen67 avatar Feb 12 '21 19:02 Margen67