diff --git a/.github/workflows/auto release.yml b/.github/workflows/auto release.yml index 103c5b0..5c9bdd5 100644 --- a/.github/workflows/auto release.yml +++ b/.github/workflows/auto release.yml @@ -1,63 +1,22 @@ -name: AutoRelease +name: Release on: - push: - branches: [ master ] + workflow_dispatch: jobs: release: + permissions: + contents: write + issues: write + pull-requests: write runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: '14' - - - name: Install dependencies - run: npm install - - - name: Build - run: npm run build - - - name: Install unzip - run: sudo apt-get update && sudo apt-get install -y unzip - - - name: Download Artifact - uses: actions/download-artifact@v3 + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 with: - name: Artifacts - path: ./build/libs - - - name: Unzip Artifact - run: | - echo "Unzipping artifact..." - unzip -d ./extracted ./build/libs/Artifacts.zip - ls -l ./extracted - - - name: Create GitHub Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - with: - tag_name: "latest" # or use a dynamic tag if applicable - release_name: "Release latest" - body: | - Changes in this release: - - Add your changes here - draft: false - prerelease: false - - - name: Upload Release Asset - uses: actions/upload-release-asset@v1 + node-version: 16 + - run: npm ci + - run: npm run build + - run: npx semantic-release env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./extracted/*.jar - asset_name: $(basename ./extracted/*.jar) - asset_content_type: application/java-archive \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} \ No newline at end of file