diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8283ecd..e210b0f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,37 +1,30 @@ -name: turboXpress +name: Release on: push: branches: - main + - beta -jobs: - build-and-publish: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: '18' - - - name: Install Dependencies - run: npm ci +permissions: + contents: read + packages: write + pull-requests: write - - name: Build Package - run: npm run build - - - name: Publish to npm - uses: actions/upload-artifact@v3 - with: - name: npm-package - path: dist/ - - - name: Create npm Release - run: | - npm publish --access public - echo "## npm Package Published" >> $GITHUB_STEP_SUMMARY - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '14' + - run: npm install + - run: npm run build + - run: npm audit signatures + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release + \ No newline at end of file diff --git a/README.md b/README.md index 88a3dc3..604b2c2 100644 --- a/README.md +++ b/README.md @@ -1 +1,8 @@ -# turboXpress \ No newline at end of file +# turboXpress + +```bash +npm -g install turboxpress + +# usage +turbo init +``` \ No newline at end of file diff --git a/package.json b/package.json index 785e131..5014041 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "turboxpress", - "version": "1.0.0", + "name": "@turboxpress/turboxpress", + "version": "0.0.0-development", "description": "A package to initialize a basic Express.js project with turbo speed", "main": "dist/index.js", "bin": { @@ -21,6 +21,11 @@ }, "files": [ "dist", - "bin" - ] + "bin", + "LICENSE", + "README.md" + ], + "publishConfig": { + "access": "public" + } } diff --git a/release.config.cjs b/release.config.cjs new file mode 100644 index 0000000..993e962 --- /dev/null +++ b/release.config.cjs @@ -0,0 +1,6 @@ +module.exports = { + branches: ['main', { + name: 'beta', + prerelease: true + }], +} \ No newline at end of file