diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 4b9d79a..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,71 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ master ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ master ] - schedule: - - cron: '29 21 * * 2' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'javascript' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 6a52f85..fc86ce4 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -25,12 +25,12 @@ jobs: strategy: matrix: - node-version: [12.x] + node-version: [16.x] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.1.4 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} @@ -44,8 +44,8 @@ jobs: # CI: true # - name: Lint TypeScript code # run: npm run lint -# - name: Test package files -# run: npm run test:package + - name: Test package files + run: npm run test:package # Runs adapter tests on all supported node versions and OSes adapter-tests: @@ -56,29 +56,29 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [12.x, 14.x, 16.x] + node-version: [14.x, 16.x, 18.x] os: [ubuntu-latest, windows-latest, macos-latest] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.1.4 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - name: Install Dependencies run: npm ci - - name: Run local tests - run: npm test -# - name: Run unit tests -# run: npm run test:unit -# - name: Run integration tests # (linux/osx) -# if: startsWith(runner.OS, 'windows') == false -# run: DEBUG=testing:* npm run test:integration -# - name: Run integration tests # (windows) -# if: startsWith(runner.OS, 'windows') -# run: set DEBUG=testing:* & npm run test:integration +# - name: Run local tests +# run: npm test + - name: Run unit tests + run: npm run test:unit + - name: Run integration tests # (linux/osx) + if: startsWith(runner.OS, 'windows') == false + run: DEBUG=testing:* npm run test:integration + - name: Run integration tests # (windows) + if: startsWith(runner.OS, 'windows') + run: set DEBUG=testing:* & npm run test:integration # Deploys the final package to NPM deploy: @@ -92,14 +92,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [12.x] + node-version: [16.x] steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.1.4 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} @@ -126,6 +126,17 @@ jobs: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} npm whoami npm publish + - name: Create Github Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release v${{ steps.extract_release.outputs.VERSION }} + draft: false + # Prerelease versions create prereleases on Github + prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }} + body: ${{ steps.extract_release.outputs.BODY }} - name: Notify Sentry.io about the release run: | @@ -133,11 +144,10 @@ jobs: export SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} export SENTRY_URL=https://sentry.iobroker.net export SENTRY_ORG=iobroker - export SENTRY_PROJECT=iobroker-meteoalarm - export SENTRY_VERSION=iobroker.meteoalarm@${{ steps.extract_release.outputs.VERSION }} + export SENTRY_PROJECT=iobroker-backitup + export SENTRY_VERSION=iobroker.backitup@${{ steps.extract_release.outputs.VERSION }} sentry-cli releases new $SENTRY_VERSION - sentry-cli releases finalize $SENTRY_VERSION sentry-cli releases set-commits $SENTRY_VERSION --auto - + sentry-cli releases finalize $SENTRY_VERSION # Add the following line BEFORE finalize if sourcemap uploads are needed # sentry-cli releases files $SENTRY_VERSION upload-sourcemaps build/ \ No newline at end of file