Skip to content

Commit

Permalink
Remove README and CONTRIBUTING files from release 3rd try (#5226)
Browse files Browse the repository at this point in the history
  • Loading branch information
D074360 authored Jan 9, 2025
1 parent 38f9e5b commit 50a2d02
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions .github/workflows/release-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
permissions: write-all
name: Publish
runs-on: ubuntu-latest
env:
ARCHIVE_NAME: jenkins-library-${{ env.PIPER_version }}
steps:
- uses: styfle/[email protected]

Expand All @@ -28,32 +30,35 @@ jobs:
npm install semver --quiet
echo "PIPER_version=v$(node_modules/.bin/semver -i minor $(curl --silent "https://api.github.com/repos/$GITHUB_REPOSITORY/releases/latest" | jq -r .tag_name))" >> $GITHUB_ENV
- name: Remove files that should not be published
- name: Prepare files for archiving
run: |
rm -f README.md
rm -f CONTRIBUTING.md
mkdir ${{ github.workspace }}/temp_dir
rsync -av --exclude={README.md,CONTRIBUTING.md,'*.git*','.github/workflows*'} ./ ${{ github.workspace }}/temp_dir/
- name: Create custom release ZIP
run: |
zip -r jenkins-library-${{ env.PIPER_version }}.zip . -x "*.git*" "*.github/workflows*"
cd ${{ github.workspace }}/temp_dir
zip -r ../${{ env.ARCHIVE_NAME }}.zip .
- name: Create custom release tar.gz
run: |
tar -czvf jenkins-library-${{ env.PIPER_version }}.tar.gz --exclude=".git" --exclude=".github/workflows" .
cd ${{ github.workspace }}/temp_dir
tar -czvf ../${{ env.ARCHIVE_NAME }}.tar.gz .
- name: Publish release assets
- name: Publish custom release ZIP
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./jenkins-library-${{ env.PIPER_version }}.zip
asset_name: jenkins-library-${{ env.PIPER_version }}.zip
asset_path: ./${{ env.ARCHIVE_NAME }}.zip
asset_name: ${{ env.ARCHIVE_NAME }}.zip
asset_content_type: application/zip

- uses: actions/upload-release-asset@v1
- name: Publish custom release tar.gz
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./jenkins-library-${{ env.PIPER_version }}.tar.gz
asset_name: jenkins-library-${{ env.PIPER_version }}.tar.gz
asset_path: ./${{ env.ARCHIVE_NAME }}.tar.gz
asset_name: ${{ env.ARCHIVE_NAME }}.tar.gz
asset_content_type: application/gzip

- uses: SAP/project-piper-action@master
Expand Down

0 comments on commit 50a2d02

Please sign in to comment.