|
| 1 | +name: Release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - '*' |
| 7 | + |
| 8 | +jobs: |
| 9 | + release: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + |
| 13 | + - uses: actions/checkout@v4 |
| 14 | + |
| 15 | + - name: Set up Node.js |
| 16 | + uses: actions/setup-node@v4 |
| 17 | + with: |
| 18 | + node-version: '20.x' |
| 19 | + |
| 20 | + - name: Evaluate version |
| 21 | + run: | |
| 22 | + RELEASE_VERSION=${GITHUB_REF##*/v} && \ |
| 23 | + echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV && \ |
| 24 | + echo "Using version '${RELEASE_VERSION}'" |
| 25 | +
|
| 26 | + - name: Set version |
| 27 | + run: npm -no-git-tag-version --allow-same-version -f version $RELEASE_VERSION |
| 28 | + |
| 29 | + - name: Install dependencies |
| 30 | + run: npm install |
| 31 | + |
| 32 | + - name: Run linter |
| 33 | + run: npm run lint |
| 34 | + |
| 35 | + - name: Run unit tests |
| 36 | + run: npm run test |
| 37 | + |
| 38 | + # - name: Build the extension |
| 39 | + # run: npm run extension:package |
| 40 | + |
| 41 | + # keeping this two stubbed until we're ready to release |
| 42 | + # until then we might want to add tags without actually releasing |
| 43 | + # (e.g. to enable rollbacks down the line) |
| 44 | + # TODO after repo is public: |
| 45 | + # * change baseContentUrl across the repo |
| 46 | + # * remove `echo` stubs |
| 47 | + |
| 48 | + - name: Publish the extension |
| 49 | + run: | |
| 50 | + npx vsce vefify-pat -p ${{ secrets.VSCE_MARKETPLACE_TOKEN }} |
| 51 | + # echo npx vsce publish \ |
| 52 | + # -p ${{ secrets.VSCE_MARKETPLACE_TOKEN }} \ |
| 53 | + # --baseContentUrl https://bitbucket.org/atlassianlabs/atlascode/src/main/ \ |
| 54 | + # --packagePath atlascode-${GITHUB_REF##*/v}.vsix |
| 55 | +
|
| 56 | + - name: Publish to OpenVSX |
| 57 | + run: | |
| 58 | + npx ovsx vefify-pat -p ${{ secrets.OPENVSX_KEY }} |
| 59 | + # echo npx ovsx publish \ |
| 60 | + # -p ${{ secrets.OPENVSX_KEY }} \ |
| 61 | + # "atlascode-${GITHUB_REF##*/v}.vsix" |
| 62 | +
|
0 commit comments