diff --git a/.github/workflows/productivity b/.github/workflows/productivity new file mode 100644 index 0000000..d21cdf2 --- /dev/null +++ b/.github/workflows/productivity @@ -0,0 +1,7 @@ +{ + "name": "your-action-name", + "main": "dist/index.js", + "scripts": { + "build": "npx @vercel/ncc build && npx convert-action" + } +} diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml new file mode 100644 index 0000000..c1f336d --- /dev/null +++ b/.github/workflows/webpack.yml @@ -0,0 +1,55 @@ +name: NodeJS with Webpack + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] - name: Setup Node.js environment + uses: actions/setup-node@v6.3.0 + with: + # Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0. + node-version: # optional + # File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions. + node-version-file: # optional + # Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default. + architecture: # optional + # Set this option if you want the action to check for the latest available version that satisfies the version spec. + check-latest: # optional + # Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN. + registry-url: # optional + # Optional scope for authenticating against scoped registries. Will fall back to the repository owner when using the GitHub Packages registry (https://npm.pkg.github.com/). + scope: # optional + # Used to pull node distributions from node-versions. Since there's a default, this is typically not supplied by the user. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting. + token: # optional, default is ${{ github.server_url == 'https://github.com' && github.token || '' }} + # Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm. + cache: # optional + # Set to false to disable automatic caching. By default, caching is enabled when either devEngines.packageManager or the top-level packageManager field in package.json specifies npm as the package manager. + package-manager-cache: # optional, default is true + # Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies. + cache-dependency-path: # optional + # Used to specify an alternative mirror to download Node.js binaries from + mirror: # optional + # The token used as Authorization header when fetching from the mirror + mirror-token: # optional + + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Build + run: | + npm install + npx webpack diff --git a/automation.yml b/automation.yml new file mode 100644 index 0000000..9cf0300 --- /dev/null +++ b/automation.yml @@ -0,0 +1,43 @@ +{ + "name": "Designconstant", + "main": "dist/index.js", + "scripts": { + "build": "npx @vercel/ncc build && npx convert-action" + } +}name: Publish + +on: + release: + types: [published, edited] +steps: + - uses: joutvhu/get-release@v1 + with: + latest: true + # Tag name start with `v` + pattern: '^v.*' + # Including pre-release + prerelease: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with:- uses: fictional/releaser@v1 # Not a real action! + id: releasersteps: + - uses: joutvhu/get-release@v1 + with: + tag_name: v1.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +- uses: JasonEtco/build-and-tag-action@v2 + with: + tag_name: ${{ steps.releaser.outputs.tag_name }} + ref: ${{ github.event.release.tag_name }} + - name: Install deps and build + run: npm ci && npm run build + - uses: JasonEtco/build-and-tag-action@v2 + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/release-tag.yml b/release-tag.yml new file mode 100644 index 0000000..e9e4aa5 --- /dev/null +++ b/release-tag.yml @@ -0,0 +1,5 @@ +- uses: fictional/releaser@v1 # Not a real action! + id: releaser +- uses: JasonEtco/build-and-tag-action@v2 + with: + tag_name: ${{ steps.releaser.outputs.tag_name }}