Skip to content

Commit

Permalink
fix the workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
penndev committed Nov 25, 2023
1 parent 622cc4a commit 66080c2
Showing 1 changed file with 31 additions and 25 deletions.
56 changes: 31 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,41 @@ name: release
on:
push:
tags:
- 'v*'
- "v*.*.*"

jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21.x']
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build project # This would actually build your project, using zip for an example artifact
run: |
zip --junk-paths my-artifact README.MD
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
go-version: ${{ matrix.go-version }}
- name: Setup Luajit
run: |
sudo apt-get update
sudo apt-get install -y luajit
- name: Checkout Code
uses: actions/checkout@v4
- name: Build Golnag
run: go build
- name: Build Luajit
run: |
folder="./script"
for file in $folder/*.lua
do
luajit -b $file $file
done
- name: Archive Files
run: |
tar -czvf wafcdn.tar.gz *
zip -r wafcdn.zip *
- name: Release
uses: softprops/action-gh-release@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./my-artifact.zip
asset_name: my-artifact.zip
asset_content_type: application/zip
files: |
wafcdn.tar.gz
wafcdn.zip

0 comments on commit 66080c2

Please sign in to comment.