diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..71268e9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +on: + push: + tags: + - '*' + +env: + node: true + es6: true + +jobs: + release_job: + runs-on: ubuntu-latest + name: đŸ’Ÿ Releasing + steps: + - name: ✔ Checkout + uses: actions/checkout@v4 + + - name: đŸ’» Download node and release package + uses: actions/setup-node@v4 + with: + node-version: 20 + - run: npm install + - run: npm install --save-dev + - run: npm run build + - run: npm install -g pkg-fetch + - run: pkg-fetch dist/index.js + + - name: 🛠 Draft Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ✹v${{ github.ref }} + draft: true + + - id: step_upload_url + run: echo "::set-output name=upload_url::${{ steps.create_release.outputs.upload_url }}" + + - name: 🛠 Build Release (Linux) + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.release_job.output.step_upload_url }} + asset_path: ../../../.pkg-cache/v3.5/fetched-v19.8.1-linux-x64 + asset_name: blahaj-linux-x64 + asset_content_type: application/x-elf \ No newline at end of file