diff --git a/.github/workflows/yue_release.yml b/.github/workflows/yue_release.yml new file mode 100644 index 0000000..5d57250 --- /dev/null +++ b/.github/workflows/yue_release.yml @@ -0,0 +1,67 @@ +name: Create Yuescript Release + +on: + push: + tags: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Change directory + run: cd $GITHUB_WORKSPACE + + - name: Remove unused files and folders + run: | + rm .gitignore + rm -rf .github + + - name: Create VERSION file + run: echo -e ${{ github.ref_name }} > VERSION + + - name: Download Yuescript and unzip yue + run: | + wget https://github.com/pigpigyyy/Yuescript/releases/download/v0.21.8/yue-linux-x86_64.zip + unzip yue-linux-x86_64.zip + rm yue-linux-x86_64.zip + + - name: Build .lua and remove .yue + run: | + ./yue ./ + rm yue + find . -type f -name '*.yue' -delete + + - name: Push to lua branch + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git add . + git commit -m "Release build: $(cat VERSION)" + git push -f origin HEAD:lua + + - name: Remove .git dir + run: rm -rf .git + + - name: Create subdirectory + run: mkdir ${{ github.event.repository.name }} + + - name: Move files into sub directory + run: ls | grep -v ${{ github.event.repository.name }} | xargs mv -t ${{ github.event.repository.name }} + + - name: Create Release Asset + run: zip -r9 ${{ github.event.repository.name }}.zip . + + - name: Publish Release + uses: softprops/action-gh-release@v1 + id: create_release + with: + name: Release ${{ github.ref_name }} + draft: false + prerelease: false + generate_release_notes: true + files: | + ./${{ github.event.repository.name }}.zip diff --git a/.gitignore b/.gitignore index 136cd2a..d907c43 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -lua/autorun/client/vgui-tools.lua +*.lua diff --git a/LICENSE b/LICENSE index 8a4d0b0..fc575e0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 PrikolMen:-b +Copyright (c) 2024 Unknown Developer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal