Skip to content

Version 3.2.0 Changelog Prep (#44) #18

Version 3.2.0 Changelog Prep (#44)

Version 3.2.0 Changelog Prep (#44) #18

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
- '!*nightly*'
jobs:
release-nightly:
uses: ./.github/workflows/release-nightly.yaml
secrets: inherit
release:
runs-on: ubuntu-latest
# Release the next `nightly` before a stable version
# to prvent folks on pre-releases from being downgraded
needs: release-nightly
permissions:
contents: write
env:
ATLASCODE_FX3_API_KEY: ${{ secrets.ATLASCODE_FX3_API_KEY }}
ATLASCODE_FX3_ENVIRONMENT: ${{ vars.ATLASCODE_FX3_ENVIRONMENT }}
ATLASCODE_FX3_TARGET_APP: ${{ vars.ATLASCODE_FX3_TARGET_APP }}
ATLASCODE_FX3_TIMEOUT: ${{ vars.ATLASCODE_FX3_TIMEOUT }}
steps:
- uses: actions/checkout@v4
- name: Evaluate version
run: |
PACKAGE_VERSION=${GITHUB_REF##*/v}
./scripts/version/assert-stable.sh $PACKAGE_VERSION
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> $GITHUB_ENV
echo "RELEASE_TAG=v${PACKAGE_VERSION}" >> $GITHUB_ENV
echo "Using version '${PACKAGE_VERSION}'"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Set version
run: npm -no-git-tag-version --allow-same-version -f version $PACKAGE_VERSION
- name: Install dependencies
run: npm install
- name: Run linter
run: npm run lint
- name: Run unit tests
run: npm run test
- name: Fetch E2E image
run: |
docker pull ghcr.io/atlassian/atlascode-e2e:latest
docker tag ghcr.io/atlassian/atlascode-e2e:latest atlascode-e2e
- name: Run E2E tests
run: npm run test:e2e:docker
# TODO: might want to run this first, and reuse the .vsix in E2E tests instead
- name: Build the extension
run: npm run extension:package
- name: Publish the extension
run: |
npx vsce publish \
-p ${{ secrets.VSCE_MARKETPLACE_TOKEN }} \
--baseContentUrl https://raw.githubusercontent.com/atlassian/atlascode/main/ \
--packagePath atlascode-${PACKAGE_VERSION}.vsix
- name: Publish to OpenVSX
run: |
npx ovsx publish \
-p ${{ secrets.OPENVSX_KEY }} \
"atlascode-${PACKAGE_VERSION}.vsix"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_TAG }}
release_name: Release ${{ env.RELEASE_TAG }}
draft: false
prerelease: false
- name: Upload Release Assets
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./atlascode-${{ env.PACKAGE_VERSION }}.vsix
asset_name: atlascode-${{ env.PACKAGE_VERSION }}.vsix
asset_content_type: application/zip