diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f3aba0..3974202 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,43 +4,25 @@ on: release: types: - published - - created - - edited permissions: contents: write jobs: - publish: - name: 'Release to npm.js' + binaries: + name: 'Build Binaries' runs-on: 'ubuntu-latest' steps: - name: 'Checkout' uses: actions/checkout@v4 - with: - fetch-depth: '0' - name: 'Setup Node.js' uses: actions/setup-node@v4 with: node-version-file: 'package.json' - registry-url: 'https://registry.npmjs.org' - name: 'NPM: install' run: npm ci - - name: 'Build API and CLI version' - run: npm run build:dist - name: 'Build Binaries' run: npm run build:bin - # - run: npm publish - # env: - # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: 'Debug' - continue-on-error: true - run: | - git config --list - git config --get user.name - git config --get user.email - npm whoami - echo ${{ github.ref_name }} - name: 'Upload Linux Binary' uses: actions/upload-release-asset@v1 with: @@ -50,3 +32,45 @@ jobs: upload_url: ${{ github.event.release.upload_url }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: 'Upload MacOS Binary' + uses: actions/upload-release-asset@v1 + with: + asset_name: 'csv-to-xlsx-macos' + asset_path: 'bin/csv-to-xlsx-macos' + asset_content_type: 'application/octet-stream' + upload_url: ${{ github.event.release.upload_url }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: 'Upload Windows Binary' + uses: actions/upload-release-asset@v1 + with: + asset_name: 'csv-to-xlsx-win.exe' + asset_path: 'bin/csv-to-xlsx-win.exe' + asset_content_type: 'application/octet-stream' + upload_url: ${{ github.event.release.upload_url }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + publish: + name: 'Publish to npmjs.com' + runs-on: 'ubuntu-latest' + steps: + - name: 'Checkout' + uses: actions/checkout@v4 + with: + fetch-depth: '0' + - name: 'Setup Node.js' + uses: actions/setup-node@v4 + with: + node-version-file: 'package.json' + registry-url: 'https://registry.npmjs.org' + - name: 'NPM: install' + run: npm ci + - name: 'NPM: set version' + run: npm version ${{ github.ref_name }} --git-tag-version=false + - name: 'Build API and CLI version' + run: npm run build:dist + - name: 'NPM: publish' + run: npm publish --dry-run=true + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index 5af0e09..020c618 100644 --- a/.gitignore +++ b/.gitignore @@ -225,3 +225,4 @@ dist # ATERNUS dist/ +bin/ diff --git a/bin/csv-to-xlsx-linux b/bin/csv-to-xlsx-linux deleted file mode 100755 index c17c2bc..0000000 Binary files a/bin/csv-to-xlsx-linux and /dev/null differ diff --git a/bin/csv-to-xlsx-macos b/bin/csv-to-xlsx-macos deleted file mode 100755 index 09eb2ad..0000000 Binary files a/bin/csv-to-xlsx-macos and /dev/null differ diff --git a/bin/csv-to-xlsx-win.exe b/bin/csv-to-xlsx-win.exe deleted file mode 100644 index 4320617..0000000 Binary files a/bin/csv-to-xlsx-win.exe and /dev/null differ