Skip to content

Commit

Permalink
remove: auto release
Browse files Browse the repository at this point in the history
  • Loading branch information
DyAxy committed Jul 16, 2024
1 parent cfee092 commit 6cb0c36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 63 deletions.
63 changes: 1 addition & 62 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,68 +19,7 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Modify next.config.mjs
run: |
echo "/** @type {import('next').NextConfig} */
const nextConfig = {};
nextConfig.output = 'export'
export default nextConfig;" > next.config.mjs
- name: Build
run: |
npm i
npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build
path: |
out
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout actions
uses: actions/checkout@v4

- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build
path: build

- name: Get the current version
id: get_version
run: |
TAG="v$(date +'%Y%m%d%H%M%S')"
echo "::set-output name=tag::$TAG"
ASSET_NAME="YASW-${TAG}.zip"
echo "::set-output name=asset_name::$ASSET_NAME"
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.tag }}
release_name: Release ${{ steps.get_version.outputs.tag }}
draft: false
prerelease: false

- name: Compress build artifacts
run: |
ls build # List contents to debug the actual path
zip -r ${{ steps.get_version.outputs.asset_name }} build
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.get_version.outputs.asset_name }}
asset_name: ${{ steps.get_version.outputs.asset_name }}
asset_content_type: application/zip
npm run build
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
with:
context: .
push: true
tags: moefaq/yet-another-sub-web:latest
tags: ${{ secrets.DOCKER_USER }}/yet-another-sub-web:latest

0 comments on commit 6cb0c36

Please sign in to comment.