Skip to content

Merge pull request #1 from deckrun/dependabot/npm_and_yarn/minor-npm-… #34

Merge pull request #1 from deckrun/dependabot/npm_and_yarn/minor-npm-…

Merge pull request #1 from deckrun/dependabot/npm_and_yarn/minor-npm-… #34

Workflow file for this run

on:
push:
branches:
- main
name: Test and release GitHub Action
jobs:
test-unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: npm test
package_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: "Ensure that code has been packaged and committed"
run: |-
npm install
npm run package
git diff --exit-code dist/index.js || \
(echo -e "\nPlease run 'npm run package' and commit the results" && exit 1)
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
- uses: actions/checkout@v6
- name: Install deck with token and team id
uses: ./
with:
token: ${{ secrets.DECKRUN_API_TOKEN }}
team_id: ${{ secrets.DECKRUN_TEAM_ID }}
- name: Install deck with token and no team id
uses: ./
with:
token: ${{ secrets.DECKRUN_API_TOKEN }}
- name: Verify installation
run: deck version
- name: Verify log-in
run: deck auth check
release:
runs-on: ubuntu-latest
needs: [test-unit, package_check, test]
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Update v1 tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch --tags
git tag -f v1 ${{ steps.tag_version.outputs.new_tag }}
git push origin v1 --force
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
generate_release_notes: true