diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eddc44d0..47c48676 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: run: npx wrangler build - name: Add Header - run: cp ${{ github.workspace }}/dist/worker.js ${{ github.workspace }}/dist/worker-original.js && echo -e "/*!\r\n * v2ray Subscription Worker (${{ github.sha }})\r\n * Copyright 2024 Vahid Farid (https://twitter.com/vahidfarid)\r\n * Licensed under GPLv3 (https://github.com/vfarid/v2ray-worker/blob/main/Licence.md)\r\n */\r\n\r\n" > ${{ github.workspace }}/dist/worker.js && cat ${{ github.workspace }}/dist/worker-original.js >> ${{ github.workspace }}/dist/worker.js && rm -f ${{ github.workspace }}/dist/worker-original.js + run: cp ${{ github.workspace }}/dist/worker.js ${{ github.workspace }}/dist/worker-original.js && echo -e "/*!\r\n * v2ray Subscription Worker (${{ github.sha }})\r\n * Copyright 2024 Vahid Farid (https://twitter.com/vahidfarid)\r\n * Licensed under GPLv3 (https://github.com/vfarid/v2ray-worker/blob/main/Licence.md)\r\n */\r\n" > ${{ github.workspace }}/dist/worker.js && cat ${{ github.workspace }}/dist/worker-original.js >> ${{ github.workspace }}/dist/worker.js - name: Upload to Artifacts uses: actions/upload-artifact@v4 @@ -38,7 +38,7 @@ jobs: path: ${{ github.workspace }}/dist/worker.js - name: Add Release Header - run: echo -e "/*!\n * v2ray Subscription Worker ${{ github.event.release.tag_name }}\n * Copyright 2024 Vahid Farid (https://twitter.com/vahidfarid)\n * Licensed under GPLv3 (https://github.com/vfarid/v2ray-worker/blob/main/Licence.md)\n */\n\n$(cat ${{ github.workspace }}/dist/worker-original.js)" > ${{ github.workspace }}/dist/worker.js + run: echo -e "/*!\r\n * v2ray Subscription Worker ${{ github.event.release.tag_name }}\r\n * Copyright 2024 Vahid Farid (https://twitter.com/vahidfarid)\r\n * Licensed under GPLv3 (https://github.com/vfarid/v2ray-worker/blob/main/Licence.md)\r\n */\r\n" > ${{ github.workspace }}/dist/worker.js && cat ${{ github.workspace }}/dist/worker-original.js >> ${{ github.workspace }}/dist/worker.js - name: Upload to GitHub Release uses: svenstaro/upload-release-action@v2