Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchelbaker-cisa authored Feb 2, 2024
1 parent 42f36ff commit ae62a33
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ on:
- 'release-*'

jobs:
#pullrequest_opened:
# name: pullrequest_opened
# runs-on: ubuntu-latest
# if: |
# contains(github.event.pull_request.labels.*.name, 'feat') ||
# contains(github.event.pull_request.labels.*.name, 'update') ||
# contains(github.event.pull_request.labels.*.name, 'fix')

lint:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -69,26 +61,35 @@ jobs:
continue-on-error: true
run: |
semgrep --config "p/r2c" .
release:
build-release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: [lint, semgrep-scan]
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@v4

- name: Set up tag name
id: tag
run: echo "::set-output name=tag::${GITHUB_REF##*/}"
- name: Get release version
id: version
run: |
echo "${${{ github.ref_name }}##*- }" >> $GITHUB_ENV
- name: Build
run: git ls-files | zip release-${{ steps.tag.outputs.tag }}.zip -@
- name: Get current date
id: date
run: |
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
- name: Build
run: git ls-files | zip LME-${{ env.version }}.zip -@

- name: Release
uses: softprops/action-gh-release@v1
with:
files: release-${{ steps.tag.outputs.tag }}.zip
name: "LME v${{ env.version }}"
tag_name: "v${{ env.version }}"
files: LME-${{ env.version }}.zip
draft: true
generate_release_notes: true
generate_release_notes: true
body: "## [${{ env.version }}] - Timberrrrr! - ${{ env.date }}"
fail_on_unmatched_files: true

0 comments on commit ae62a33

Please sign in to comment.