ci: add workflow to create pipeline to test #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check extension | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Install tfx-cli and typescript | |
run: | | |
npm install -g tfx-cli | |
npm install -g typescript | |
- name: Login to Azure DevOps | |
uses: azure/login@v2 | |
with: | |
client-id: ${{ secrets.AZURE_APPLICATION_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
- name: Get Azure DevOps access token | |
id: devops_token | |
run: | | |
TOKEN="$(az account get-access-token --resource "${{ secrets.AZURE_MARKETPLACE_ACCESS_SCOPE }}" --query accessToken -o tsv)" | |
echo "::add-mask::$TOKEN" | |
echo "azure_devops_access_token=$TOKEN" >> "$GITHUB_OUTPUT" | |
- name: Build release | |
run: | | |
make build | |
- name: Increment version | |
id: bump | |
run: | | |
chmod +x ./bump_version.sh | |
NEW_VERSION="$(./bump_version.sh)" | |
if [[ -z "$NEW_VERSION" ]]; then | |
echo "Version bump script returned empty version" >&2 | |
exit 1 | |
fi | |
echo "new_version=$NEW_VERSION" >> "$GITHUB_OUTPUT" |